fix mixer clear residual data, reduce brush preview updates especially on gesture
This commit is contained in:
@@ -206,7 +206,7 @@ void NodePanelStroke::init_controls()
|
||||
*Canvas::I->m_current_brush = *b;
|
||||
Canvas::I->m_current_brush->m_tip_color = old_color;
|
||||
Canvas::I->m_current_brush->load();
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
m_brush_thumb->set_image(b->m_brush_thumb_path);
|
||||
m_dual_brush_thumb->set_image(b->m_dual_thumb_path);
|
||||
m_pattern_thumb->set_image(b->m_pattern_thumb_path);
|
||||
@@ -330,7 +330,7 @@ void NodePanelStroke::init_controls()
|
||||
m_blend_mode = find<NodeComboBox>("blend-mode");
|
||||
m_blend_mode->on_select = [this](Node*, int index) {
|
||||
Canvas::I->m_current_brush->m_blend_mode = index;
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
if (on_stroke_change)
|
||||
on_stroke_change(this);
|
||||
};
|
||||
@@ -464,7 +464,7 @@ void NodePanelStroke::init_controls()
|
||||
m_tip_aspect_reset->on_click = [this](Node*) {
|
||||
m_tip_aspect->set_value(0.5);
|
||||
Canvas::I->m_current_brush->m_tip_aspect = 0.5f;
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
if (on_stroke_change)
|
||||
on_stroke_change(this);
|
||||
};
|
||||
@@ -472,7 +472,7 @@ void NodePanelStroke::init_controls()
|
||||
m_dual_blend_mode = find<NodeComboBox>("dual-blend-mode");
|
||||
m_dual_blend_mode->on_select = [this](Node*, int index) {
|
||||
Canvas::I->m_current_brush->m_dual_blend_mode = index;
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
if (on_stroke_change)
|
||||
on_stroke_change(this);
|
||||
};
|
||||
@@ -480,7 +480,7 @@ void NodePanelStroke::init_controls()
|
||||
m_pattern_blend_mode = find<NodeComboBox>("pattern-blend-mode");
|
||||
m_pattern_blend_mode->on_select = [this](Node*, int index) {
|
||||
Canvas::I->m_current_brush->m_pattern_blend_mode = index;
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
if (on_stroke_change)
|
||||
on_stroke_change(this);
|
||||
};
|
||||
@@ -540,7 +540,7 @@ void NodePanelStroke::handle_slide(float Brush::* prop, Node* target, float valu
|
||||
{
|
||||
auto curve = m_curves.find((NodeSliderH*)target);
|
||||
Canvas::I->m_current_brush.get()->*prop = curve != m_curves.end() ? curve->second.to_value(value) : value;
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
if (on_stroke_change)
|
||||
on_stroke_change(this);
|
||||
}
|
||||
@@ -556,7 +556,7 @@ void NodePanelStroke::init_checkbox(NodeCheckBox*& target, const char* id, bool
|
||||
void NodePanelStroke::handle_checkbox(bool Brush::* prop, Node *target, bool value)
|
||||
{
|
||||
Canvas::I->m_current_brush.get()->*prop = value;
|
||||
m_preview->draw_stroke();
|
||||
//m_preview->draw_stroke();
|
||||
if (on_stroke_change)
|
||||
on_stroke_change(this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user