1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

PixelPaint: Make escape key clear selection for Wand Select Tool

This commit is contained in:
Timothy Slater 2022-09-02 19:05:50 -05:00 committed by Linus Groh
parent e81cf66784
commit 53e4cc16ff
2 changed files with 9 additions and 0 deletions

View file

@ -37,6 +37,14 @@ static void set_flood_selection(Gfx::Bitmap& bitmap, Image& image, Gfx::IntPoint
image.selection().merge(selection_mask, merge_mode);
}
void WandSelectTool::on_keydown(GUI::KeyEvent& key_event)
{
Tool::on_keydown(key_event);
if (key_event.key() == KeyCode::Key_Escape) {
m_editor->image().selection().clear();
}
}
void WandSelectTool::on_mousedown(Layer* layer, MouseEvent& event)
{
if (!layer)