diff options
author | Robin Gareus <robin@gareus.org> | 2014-09-13 16:59:02 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-09-13 16:59:02 +0200 |
commit | d8e64103a6c2f9d357f3b693907962e9daf0f25b (patch) | |
tree | 853baf8b5a380287190eaeeb8f8268b23767f19c /gtk2_ardour/ardour_ui_dialogs.cc | |
parent | 009ced96409d1aa7e8999f4c13e7cf60fe2040e2 (diff) |
fix CPI window handling:
Move control-surface editor-window management to the control surface.
The Preferences-Dialog is not aware of session specific or surface
specific actions and cannot properly manage the window.
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 0dc7104f8c..8cd65ef378 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -25,8 +25,10 @@ #include "ardour/audioengine.h" #include "ardour/automation_watch.h" +#include "ardour/control_protocol_manager.h" #include "ardour/profile.h" #include "ardour/session.h" +#include "control_protocol/control_protocol.h" #include "actions.h" #include "add_route_dialog.h" @@ -262,6 +264,16 @@ ARDOUR_UI::unload_session (bool hide_stuff) } } + { + // tear down session specific CPI (owned by rc_config_editor which can remain) + ControlProtocolManager& m = ControlProtocolManager::instance (); + for (std::list<ControlProtocolInfo*>::iterator i = m.control_protocol_info.begin(); i != m.control_protocol_info.end(); ++i) { + if (*i && (*i)->protocol && (*i)->protocol->has_editor ()) { + (*i)->protocol->tear_down_gui (); + } + } + } + if (hide_stuff) { editor->hide (); mixer->hide (); |