refactor to have a single global current brush on Canvas::m_current_brush and make panels read from it for drawing instead of relying on their own copy

This commit is contained in:
2017-11-07 09:14:02 +00:00
parent 3e546affc9
commit 53062711fa
13 changed files with 79 additions and 89 deletions

View File

@@ -81,7 +81,7 @@ bool App::mouse_scroll(float x, float y, float delta)
MouseEvent e;
e.m_type = kEventType::MouseScroll;
e.m_pos = { x / zoom, y / zoom };
e.m_scroll_delta = delta * 0.1f;
e.m_scroll_delta = delta;
auto ret = layout[main_id]->on_event(&e);
layout[main_id]->update();
return ret == kEventResult::Consumed;