mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
PixelPaint: Pass doubleclick events to tools
This commit is contained in:
parent
7b163573e6
commit
20f6485311
3 changed files with 11 additions and 0 deletions
|
@ -356,6 +356,14 @@ void ImageEditor::mousedown_event(GUI::MouseEvent& event)
|
|||
m_active_tool->on_mousedown(m_active_layer.ptr(), tool_event);
|
||||
}
|
||||
|
||||
void ImageEditor::doubleclick_event(GUI::MouseEvent& event)
|
||||
{
|
||||
auto layer_event = m_active_layer ? event_adjusted_for_layer(event, *m_active_layer) : event;
|
||||
auto image_event = event_with_pan_and_scale_applied(event);
|
||||
Tool::MouseEvent tool_event(Tool::MouseEvent::Action::DoubleClick, layer_event, image_event, event);
|
||||
m_active_tool->on_doubleclick(m_active_layer.ptr(), tool_event);
|
||||
}
|
||||
|
||||
void ImageEditor::mousemove_event(GUI::MouseEvent& event)
|
||||
{
|
||||
m_mouse_position = event.position();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue