summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/PixelPaint')
-rw-r--r--Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp
index fa52524495..559be8ae9a 100644
--- a/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp
+++ b/Userland/Applications/PixelPaint/Tools/RectangleSelectTool.cpp
@@ -115,6 +115,13 @@ void RectangleSelectTool::on_keydown(GUI::KeyEvent& key_event)
m_moving_mode = MovingMode::MovingOrigin;
else if (key_event.key() == KeyCode::Key_Control)
m_moving_mode = MovingMode::AroundCenter;
+
+ if (key_event.key() == KeyCode::Key_Escape) {
+ if (m_selecting)
+ m_selecting = false;
+ else
+ m_editor->selection().clear();
+ }
}
void RectangleSelectTool::on_keyup(GUI::KeyEvent& key_event)