diff options
author | Mustafa Quraish <mustafaq9@gmail.com> | 2021-09-12 22:55:59 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-13 13:43:53 +0200 |
commit | a5c8d1f7dde0f9df5a2f9f16cbbedeb6e6f6014f (patch) | |
tree | 7e4fb03f794adaea8cb63507219304c97e5f3c44 /Userland/Applications/PixelPaint | |
parent | 36bcd63c0c6adddc6882285e305f3dc52b46c518 (diff) | |
download | serenity-a5c8d1f7dde0f9df5a2f9f16cbbedeb6e6f6014f.zip |
PixelPaint: Update editor after drawing shapes to clear outside
Previously, we didn't ask the editor to update after drawing a
Rectangle/Line. This meant that if any part of your shape went
outside the bounds of the image, that part would not be cleared out
until the next update of the editor.
Diffstat (limited to 'Userland/Applications/PixelPaint')
-rw-r--r-- | Userland/Applications/PixelPaint/LineTool.cpp | 1 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/RectangleTool.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/LineTool.cpp b/Userland/Applications/PixelPaint/LineTool.cpp index 23e92b4602..fa47a00170 100644 --- a/Userland/Applications/PixelPaint/LineTool.cpp +++ b/Userland/Applications/PixelPaint/LineTool.cpp @@ -71,6 +71,7 @@ void LineTool::on_mouseup(Layer* layer, MouseEvent& event) painter.draw_line(m_line_start_position, m_line_end_position, m_editor->color_for(m_drawing_button), m_thickness); m_drawing_button = GUI::MouseButton::None; layer->did_modify_bitmap(); + m_editor->update(); m_editor->did_complete_action(); } } diff --git a/Userland/Applications/PixelPaint/RectangleTool.cpp b/Userland/Applications/PixelPaint/RectangleTool.cpp index ec3bceeb1b..f19b123e31 100644 --- a/Userland/Applications/PixelPaint/RectangleTool.cpp +++ b/Userland/Applications/PixelPaint/RectangleTool.cpp @@ -80,6 +80,7 @@ void RectangleTool::on_mouseup(Layer* layer, MouseEvent& event) draw_using(painter, m_rectangle_start_position, m_rectangle_end_position, m_thickness); m_drawing_button = GUI::MouseButton::None; layer->did_modify_bitmap(); + m_editor->update(); m_editor->did_complete_action(); } } |