summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/Tools/CloneTool.cpp
diff options
context:
space:
mode:
authorZaggy1024 <zaggy1024@gmail.com>2022-10-24 20:17:21 -0500
committerSam Atkins <atkinssj@gmail.com>2022-11-14 16:08:11 +0000
commit7ce346e50e3a7b02934d3d95c09c6a8ff9608916 (patch)
tree4e5b124b35d9ba61b0b1d1e32ad9263c5fe6a4ec /Userland/Applications/PixelPaint/Tools/CloneTool.cpp
parent967dfa79563f5fa83aa27275bd57fc616a57ce55 (diff)
downloadserenity-7ce346e50e3a7b02934d3d95c09c6a8ff9608916.zip
PixelPaint: Allow keydown events to bubble from ImageEditor
Previously, all keydown KeyEvents were accepted, causing parent widgets not to receive them. With the addition of shortcut handling to keydown, shortcuts were not called when the ImageEditor was focused.
Diffstat (limited to 'Userland/Applications/PixelPaint/Tools/CloneTool.cpp')
-rw-r--r--Userland/Applications/PixelPaint/Tools/CloneTool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/PixelPaint/Tools/CloneTool.cpp b/Userland/Applications/PixelPaint/Tools/CloneTool.cpp
index 0ed7f141dd..56805197b1 100644
--- a/Userland/Applications/PixelPaint/Tools/CloneTool.cpp
+++ b/Userland/Applications/PixelPaint/Tools/CloneTool.cpp
@@ -114,14 +114,14 @@ void CloneTool::on_second_paint(Layer const*, GUI::PaintEvent& event)
painter.draw_ellipse_intersecting(rect, m_marker_color, 1);
}
-void CloneTool::on_keydown(GUI::KeyEvent& event)
+bool CloneTool::on_keydown(GUI::KeyEvent const& event)
{
- Tool::on_keydown(event);
if (event.key() == KeyCode::Key_Alt && !m_is_selecting_location) {
m_is_selecting_location = true;
m_editor->update_tool_cursor();
- return;
+ return true;
}
+ return Tool::on_keydown(event);
}
void CloneTool::on_keyup(GUI::KeyEvent& event)