From 2921166139ee036b71e4d08b5eb7816fdd4739f2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 21 Feb 2008 20:20:40 +0000 Subject: [PATCH] Fix key stealing on MIDI region views. git-svn-id: svn://localhost/ardour2/branches/3.0@3102 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_region_view.cc | 9 ++++++--- gtk2_ardour/opts.cc | 7 +++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 0ac2dfc43a..83bfbffe54 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -152,17 +152,18 @@ MidiRegionView::canvas_event(GdkEvent* ev) switch (ev->type) { case GDK_KEY_PRESS: - cout << "KEY" << endl; if (ev->key.keyval == GDK_Delete && !delete_mod) { delete_mod = true; original_mode = trackview.editor.current_midi_edit_mode(); trackview.editor.set_midi_edit_mode(MidiEditErase); start_remove_command(); _mouse_state = EraseTouchDragging; + return true; } else if (ev->key.keyval == GDK_Shift_L || ev->key.keyval == GDK_Control_L) { _mouse_state = SelectTouchDragging; + return true; } - return true; + return false; case GDK_KEY_RELEASE: if (ev->key.keyval == GDK_Delete) { @@ -174,10 +175,12 @@ MidiRegionView::canvas_event(GdkEvent* ev) trackview.editor.set_midi_edit_mode(original_mode); delete_mod = false; } + return true; } else if (ev->key.keyval == GDK_Shift_L || ev->key.keyval == GDK_Control_L) { _mouse_state = None; + return true; } - return true; + return false; case GDK_BUTTON_PRESS: if (_mouse_state != SelectTouchDragging && _mouse_state != EraseTouchDragging) diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc index 55bb58168d..aebf7cdd21 100644 --- a/gtk2_ardour/opts.cc +++ b/gtk2_ardour/opts.cc @@ -132,10 +132,9 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[]) ARDOUR::Session::set_disable_all_loaded_plugins (true); break; - - case 'm': - menus_file = optarg; - break; + case 'm': + menus_file = optarg; + break; case 'n': no_splash = false;