summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Applications')
-rw-r--r--Applications/PaintBrush/ImageEditor.cpp13
-rw-r--r--Applications/PaintBrush/ImageEditor.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/Applications/PaintBrush/ImageEditor.cpp b/Applications/PaintBrush/ImageEditor.cpp
index 60718044f1..b283d73088 100644
--- a/Applications/PaintBrush/ImageEditor.cpp
+++ b/Applications/PaintBrush/ImageEditor.cpp
@@ -98,6 +98,18 @@ void ImageEditor::mouseup_event(GUI::MouseEvent& event)
m_active_tool->on_mouseup(*m_active_layer, layer_event, event);
}
+void ImageEditor::keydown_event(GUI::KeyEvent& event)
+{
+ if (m_active_tool)
+ m_active_tool->on_keydown(event);
+}
+
+void ImageEditor::keyup_event(GUI::KeyEvent& event)
+{
+ if (m_active_tool)
+ m_active_tool->on_keydown(event);
+}
+
void ImageEditor::set_active_layer(Layer* layer)
{
if (m_active_layer == layer)
@@ -162,5 +174,4 @@ void ImageEditor::set_secondary_color(Color color)
on_secondary_color_change(color);
}
-
}
diff --git a/Applications/PaintBrush/ImageEditor.h b/Applications/PaintBrush/ImageEditor.h
index 34617e48f4..aee01cbfd0 100644
--- a/Applications/PaintBrush/ImageEditor.h
+++ b/Applications/PaintBrush/ImageEditor.h
@@ -72,6 +72,8 @@ private:
virtual void mousedown_event(GUI::MouseEvent&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
+ virtual void keydown_event(GUI::KeyEvent&) override;
+ virtual void keyup_event(GUI::KeyEvent&) override;
RefPtr<Image> m_image;
RefPtr<Layer> m_active_layer;