diff options
Diffstat (limited to 'Userland/Applications/PixelPaint/RectangleTool.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/RectangleTool.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Userland/Applications/PixelPaint/RectangleTool.cpp b/Userland/Applications/PixelPaint/RectangleTool.cpp index 746c58c9db..a5fdde2923 100644 --- a/Userland/Applications/PixelPaint/RectangleTool.cpp +++ b/Userland/Applications/PixelPaint/RectangleTool.cpp @@ -95,7 +95,11 @@ void RectangleTool::on_mousemove(Layer* layer, MouseEvent& event) m_draw_mode = event.layer_event().alt() ? DrawMode::FromCenter : DrawMode::FromCorner; - m_rectangle_end_position = event.layer_event().position(); + if (event.layer_event().shift()) + m_rectangle_end_position = m_rectangle_start_position.end_point_for_square_aspect_ratio(event.layer_event().position()); + else + m_rectangle_end_position = event.layer_event().position(); + m_editor->update(); } |