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

@@ -98,6 +98,7 @@ void CanvasModePen::on_MouseEvent(MouseEvent* me, glm::vec2& loc)
node->mouse_release();
glm::vec4 pix = canvas->pick_get(loc);
canvas->m_current_brush.m_tip_color = pix;
App::I.color->set_color(pix);
}
m_dragging = false;
m_picking = false;
@@ -109,6 +110,7 @@ void CanvasModePen::on_MouseEvent(MouseEvent* me, glm::vec2& loc)
{
glm::vec4 pix = canvas->pick_get(loc);
canvas->m_current_brush.m_tip_color = pix;
App::I.color->set_color(pix);
}
m_cur_pos = loc;
break;