use mutex to avoid window destroy deadlock, fix vertical slider to increase value upward

This commit is contained in:
2019-03-04 19:32:43 +01:00
parent 6e73a9eee5
commit 801db87e06
9 changed files with 103 additions and 71 deletions

View File

@@ -128,6 +128,7 @@ void App::init_sidebar()
};
color->on_color_changed = [this](Node* target, glm::vec4 color) {
Canvas::I->m_current_brush->m_tip_color = color;
quick->set_color(color);
};
stroke->on_brush_changed = [this](Node* target, const std::string& path, const std::string& thumb) {
@@ -147,8 +148,9 @@ void App::init_sidebar()
quick->m_slider_size->set_value(stroke->m_tip_size->get_value());
};
quick->on_color_change = [this](Node*, glm::vec3 color) {
Canvas::I->m_current_brush->m_tip_color = glm::vec4(color, 1.f);
quick->on_color_change = [this](Node*, glm::vec3 c) {
Canvas::I->m_current_brush->m_tip_color = glm::vec4(c, 1.f);
color->set_color(c);
};
quick->on_flow_change = [this](Node*, float value) {
stroke->set_flow(value, true, true);
@@ -735,6 +737,8 @@ void App::brush_update()
// brushes->select_brush(canvas->m_brush->id);
// stroke->set_params(canvas->m_brush);
stroke->update_controls();
quick->m_slider_flow->set_value(stroke->m_tip_flow->get_value());
quick->m_slider_size->set_value(stroke->m_tip_size->get_value());
}
void App::init_menu_layer()