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/mackie/gui.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 'libs/surfaces/mackie/gui.cc')
-rw-r--r-- | libs/surfaces/mackie/gui.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/surfaces/mackie/gui.cc b/libs/surfaces/mackie/gui.cc index 7425b38826..6753f0a97c 100644 --- a/libs/surfaces/mackie/gui.cc +++ b/libs/surfaces/mackie/gui.cc @@ -51,14 +51,22 @@ MackieControlProtocol::get_gui () const if (!_gui) { const_cast<MackieControlProtocol*>(this)->build_gui (); } - + static_cast<Gtk::Notebook*>(_gui)->show_all(); return _gui; } void MackieControlProtocol::tear_down_gui () { + if (_gui) { + Gtk::Widget *w = static_cast<Gtk::Widget*>(_gui)->get_parent(); + if (w) { + w->hide(); + delete w; + } + } delete (MackieControlProtocolGUI*) _gui; + _gui = 0; } void |