From 05f3adaba3eb42ba407864dd04064472e68948a6 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Wed, 23 Jul 2014 16:58:43 -0500 Subject: Allow deletion of processors in editor_mixer_strip by pointing and pressing Delete This had to be hacked because the editor_mixer strip is on the editor and doesnt respond to mixer keybindings. Also force the gain intry to lose focus if the user leaves the mixer strip. this will probably solve some long-standing complaints. although perhaps a more elegant solution is possible. --- gtk2_ardour/editor_mixer.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gtk2_ardour/editor_mixer.cc') diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index b9a711c2ec..2154da5d70 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -185,6 +185,7 @@ Editor::create_editor_mixer () current_mixer_strip->set_embedded (true); current_mixer_strip->signal_enter_notify_event().connect (sigc::mem_fun(*this, &Editor::mixer_strip_enter_event )); + current_mixer_strip->signal_leave_notify_event().connect (sigc::mem_fun(*this, &Editor::mixer_strip_leave_event )); } @@ -195,6 +196,17 @@ Editor::mixer_strip_enter_event (GdkEventCrossing *ev) return false; } +bool +Editor::mixer_strip_leave_event (GdkEventCrossing *ev) +{ + //if we have moved outside our strip, but not into a child view, then deselect ourselves + if ( !(ev->detail == GDK_NOTIFY_INFERIOR) ) { + current_mixer_strip->set_selected(false); + } + + return false; +} + void Editor::set_selected_mixer_strip (TimeAxisView& view) { -- cgit v1.2.3