summaryrefslogtreecommitdiff
path: root/Applications/PaintBrush/PaintableWidget.cpp
diff options
context:
space:
mode:
authorZyper <zyperpl@gmail.com>2019-12-17 12:57:58 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-17 21:21:24 +0100
commitb185c7f58a7ec5a57f4b74242e9a9d0d6201fcf8 (patch)
treea9644ac7bdea83e7c74bf3eb2f6972c98958aba7 /Applications/PaintBrush/PaintableWidget.cpp
parent7301db4f9aac78063736597cd0d316bcdd1a6488 (diff)
downloadserenity-b185c7f58a7ec5a57f4b74242e9a9d0d6201fcf8.zip
PaintBrush: Tools can receive KeyUp events
Diffstat (limited to 'Applications/PaintBrush/PaintableWidget.cpp')
-rw-r--r--Applications/PaintBrush/PaintableWidget.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/Applications/PaintBrush/PaintableWidget.cpp b/Applications/PaintBrush/PaintableWidget.cpp
index 33b57deeb9..41a523dd26 100644
--- a/Applications/PaintBrush/PaintableWidget.cpp
+++ b/Applications/PaintBrush/PaintableWidget.cpp
@@ -103,6 +103,13 @@ void PaintableWidget::keydown_event(GKeyEvent& event)
GWidget::keydown_event(event);
}
+void PaintableWidget::keyup_event(GKeyEvent& event)
+{
+ if (m_tool)
+ m_tool->on_keyup(event);
+ GWidget::keyup_event(event);
+}
+
void PaintableWidget::set_primary_color(Color color)
{
if (m_primary_color == color)