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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user