From ef4179afb8e8c917c2fa355900fd30e24857c7db Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 4 Mar 2010 20:55:20 +0000 Subject: Fix non-canvas key bindings (alt-f for file and such). Fix FlowCanvas::Canvas::canvas_event falsely returning 'true' (handled event) for all keypresses (not just recognized ones). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2519 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PatchCanvas.cpp | 4 ++-- src/gui/PatchWindow.cpp | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index 644f95f6..932b0ef9 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -540,13 +540,13 @@ PatchCanvas::canvas_event(GdkEvent* event) case GDK_Delete: destroy_selection(); ret = true; - break; + break; case GDK_e: if (event->key.state == 0) { _patch->set_editable(!_patch->get_editable()); ret = true; } - default: break; + default: break; } default: break; diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index 361e525a..84d86f2b 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -618,10 +618,7 @@ PatchWindow::on_hide() bool PatchWindow::on_event(GdkEvent* event) { - if (_view->canvas()->canvas_event(event)) - return true; - else - return Gtk::Window::on_event(event); + return (_view->canvas()->canvas_event(event)) ? true : Gtk::Window::on_event(event); } -- cgit v1.2.1