mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
PixelPaint: Make Layer passed to tools a pointer
Some tools (e.g. ZoomTool) doesn't need layer to work. This commit makes mouse events fire even if there is no layer. This fixes a bug that ZoomTool didn't work when there is no layers.
This commit is contained in:
parent
0224dc2882
commit
3ad9df1522
28 changed files with 202 additions and 136 deletions
|
@ -48,12 +48,12 @@ public:
|
|||
GUI::MouseEvent& m_raw_event;
|
||||
};
|
||||
|
||||
virtual void on_mousedown(Layer&, MouseEvent&) { }
|
||||
virtual void on_mousemove(Layer&, MouseEvent&) { }
|
||||
virtual void on_mouseup(Layer&, MouseEvent&) { }
|
||||
virtual void on_context_menu(Layer&, GUI::ContextMenuEvent&) { }
|
||||
virtual void on_mousedown(Layer*, MouseEvent&) { }
|
||||
virtual void on_mousemove(Layer*, MouseEvent&) { }
|
||||
virtual void on_mouseup(Layer*, MouseEvent&) { }
|
||||
virtual void on_context_menu(Layer*, GUI::ContextMenuEvent&) { }
|
||||
virtual void on_tool_button_contextmenu(GUI::ContextMenuEvent&) { }
|
||||
virtual void on_second_paint(Layer const&, GUI::PaintEvent&) { }
|
||||
virtual void on_second_paint(Layer const*, GUI::PaintEvent&) { }
|
||||
virtual void on_keydown(GUI::KeyEvent&) { }
|
||||
virtual void on_keyup(GUI::KeyEvent&) { }
|
||||
virtual void on_tool_activation() { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue