mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
PixelPaint: Use Escape to clear rectangular selections
Now while dragging a new rectangular selection you can cancel it by hitting Escape. Existing selections are cleared by Escape as well if the RectangularSelectTool is active.
This commit is contained in:
committed by
Andreas Kling
parent
a96b15d2bc
commit
d5183cb7ac
Notes:
sideshowbarker
2024-07-19 17:09:41 +09:00
Author: https://github.com/danielledeleo Commit: https://github.com/SerenityOS/serenity/commit/d5183cb7acb Pull-request: https://github.com/SerenityOS/serenity/pull/12239
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user