diff options
Diffstat (limited to 'tikzit/src/gtk/GraphEditorPanel.m')
-rw-r--r-- | tikzit/src/gtk/GraphEditorPanel.m | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tikzit/src/gtk/GraphEditorPanel.m b/tikzit/src/gtk/GraphEditorPanel.m index 4c7312a..553f261 100644 --- a/tikzit/src/gtk/GraphEditorPanel.m +++ b/tikzit/src/gtk/GraphEditorPanel.m @@ -176,10 +176,21 @@ } - (void) keyPressed:(unsigned int)keyVal withMask:(InputMask)mask { - [app activateToolForKey:keyVal withMask:mask]; + if (![app activateToolForKey:keyVal withMask:mask]) { + id<Tool> tool = [panel activeTool]; + if ([panel hasTool] && [tool respondsToSelector:@selector(keyPressed:withMask:)]) { + [tool keyPressed:keyVal withMask:mask]; + } + } } - (void) keyReleased:(unsigned int)keyVal withMask:(InputMask)mask { + if (![app activateToolForKey:keyVal withMask:mask]) { + id<Tool> tool = [panel activeTool]; + if ([panel hasTool] && [tool respondsToSelector:@selector(keyReleased:withMask:)]) { + [tool keyReleased:keyVal withMask:mask]; + } + } } @end |