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 /libs/surfaces/generic_midi | |
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 'libs/surfaces/generic_midi')
-rw-r--r-- | libs/surfaces/generic_midi/gmcp_gui.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/surfaces/generic_midi/gmcp_gui.cc b/libs/surfaces/generic_midi/gmcp_gui.cc index 6c1ee1ba3d..379f7c822c 100644 --- a/libs/surfaces/generic_midi/gmcp_gui.cc +++ b/libs/surfaces/generic_midi/gmcp_gui.cc @@ -68,13 +68,22 @@ GenericMidiControlProtocol::get_gui () const if (!gui) { const_cast<GenericMidiControlProtocol*>(this)->build_gui (); } + static_cast<Gtk::VBox*>(gui)->show_all(); return gui; } void GenericMidiControlProtocol::tear_down_gui () { + if (gui) { + Gtk::Widget *w = static_cast<Gtk::VBox*>(gui)->get_parent(); + if (w) { + w->hide(); + delete w; + } + } delete (GMCPGUI*) gui; + gui = 0; } void |