mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00: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:
parent
a96b15d2bc
commit
d5183cb7ac
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue