From 81f32cec1b1dc8850cd651b144965b5abca0e08f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 15 Mar 2016 16:43:52 -0400 Subject: [PATCH] add and remove monitor section bindings as MS is created/destroyed --- gtk2_ardour/monitor_section.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index 9702d7f25b..31378401e7 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -39,6 +39,7 @@ #include "ardour/user_bundle.h" #include "ardour/plugin_manager.h" +#include "ardour_ui.h" #include "gui_thread.h" #include "monitor_section.h" #include "public_editor.h" @@ -94,7 +95,10 @@ MonitorSection::MonitorSection (Session* s) if (!monitor_actions) { register_actions (); load_bindings (); - set_data ("ardour-bindings", bindings); + if (bindings) { + set_data ("ardour-bindings", bindings); + ARDOUR_UI::instance()->add_keyboard_binding_tab (_("Monitor Section"), *bindings); + } } _plugin_selector = new PluginSelector (PluginManager::instance()); @@ -488,6 +492,8 @@ MonitorSection::MonitorSection (Session* s) MonitorSection::~MonitorSection () { + ARDOUR_UI::instance()->remove_keyboard_binding_tab (_("Monitor Section")); + for (ChannelButtons::iterator i = _channel_buttons.begin(); i != _channel_buttons.end(); ++i) { delete *i; }