fix color picker panel, introduce an added() method when a node is added to che scene

This commit is contained in:
2017-12-23 10:56:38 +00:00
parent b389d895ab
commit 0a3363fb13
6 changed files with 30 additions and 4 deletions

View File

@@ -257,10 +257,6 @@ void App::update(float dt)
canvas->m_canvas->m_touch_lock ? color_button_hlight : color_button_normal);
stroke->update_controls();
auto pix = ui::Canvas::I->m_current_brush.m_tip_color;
auto hsv = convert_rgb2hsv(glm::vec3(pix[0], pix[1], pix[2]));
color->m_hue->m_value.y = hsv.x;
color->m_quad->m_value = glm::vec2(hsv.y, 1.f - hsv.z);
auto observer = [this](Node* n)
{