diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-25 20:50:15 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-26 01:04:52 +0200 |
commit | d571159aebbf1e7442622efb8346d5c0657c1e03 (patch) | |
tree | 8786143c2d9cb3d0520b17aeaab742ded1f04c44 /Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp | |
parent | 67596d9546fc2a08b5022dc60e5a30e3ea2c2f18 (diff) | |
download | serenity-d571159aebbf1e7442622efb8346d5c0657c1e03.zip |
PixelPaint: Move selection from ImageEditor to Image
This is preparation for making selection state undoable.
Diffstat (limited to 'Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp')
-rw-r--r-- | Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp index 890aa9bc4f..14a268c46b 100644 --- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp +++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp @@ -26,7 +26,7 @@ void RectangleSelectTool::on_mousedown(Layer*, MouseEvent& event) return; m_selecting = true; - m_editor->selection().begin_interactive_selection(); + m_editor->image().selection().begin_interactive_selection(); m_selection_start = image_event.position(); m_selection_end = image_event.position(); @@ -58,7 +58,7 @@ void RectangleSelectTool::on_mouseup(Layer*, MouseEvent& event) return; m_selecting = false; - m_editor->selection().end_interactive_selection(); + m_editor->image().selection().end_interactive_selection(); m_editor->update(); @@ -98,7 +98,7 @@ void RectangleSelectTool::on_mouseup(Layer*, MouseEvent& event) } } - m_editor->selection().merge(mask, m_merge_mode); + m_editor->image().selection().merge(mask, m_merge_mode); } void RectangleSelectTool::on_keydown(GUI::KeyEvent& key_event) @@ -113,7 +113,7 @@ void RectangleSelectTool::on_keydown(GUI::KeyEvent& key_event) if (m_selecting) m_selecting = false; else - m_editor->selection().clear(); + m_editor->image().selection().clear(); } } |