diff --git a/Userland/Applications/PixelPaint/ImageEditor.cpp b/Userland/Applications/PixelPaint/ImageEditor.cpp index aa76f0e593..81e3ad73e0 100644 --- a/Userland/Applications/PixelPaint/ImageEditor.cpp +++ b/Userland/Applications/PixelPaint/ImageEditor.cpp @@ -269,9 +269,11 @@ void ImageEditor::second_paint_event(GUI::PaintEvent& event) GUI::MouseEvent ImageEditor::event_with_pan_and_scale_applied(GUI::MouseEvent const& event) const { auto image_position = frame_to_content_position(event.position()); + auto tool_adjusted_image_position = m_active_tool->point_position_to_preferred_cell(image_position); + return { static_cast(event.type()), - image_position.to_rounded(), + tool_adjusted_image_position, event.buttons(), event.button(), event.modifiers(), @@ -286,9 +288,11 @@ GUI::MouseEvent ImageEditor::event_adjusted_for_layer(GUI::MouseEvent const& eve { auto image_position = frame_to_content_position(event.position()); image_position.translate_by(-layer.location().x(), -layer.location().y()); + auto tool_adjusted_image_position = m_active_tool->point_position_to_preferred_cell(image_position); + return { static_cast(event.type()), - image_position.to_rounded(), + tool_adjusted_image_position, event.buttons(), event.button(), event.modifiers(),