diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-03 19:45:34 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-03 19:45:34 -0500 |
commit | d7206b7830c7d55d7a53ee13f0e3f7fd5e165857 (patch) | |
tree | 5bec19c1095336fb3c287da3046a018ef6bc3fa3 /gtk2_ardour/ardour_ui_dialogs.cc | |
parent | 8648a8a13b04549362f14a0738947d997ef1abc7 (diff) |
fix gtk child packing errors related to the transport bar meter box/peak display
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 0dd61778ae..fda86fe4ad 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -68,7 +68,6 @@ ARDOUR_UI::set_session (Session *s) { SessionHandlePtr::set_session (s); - if (!_session) { WM::Manager::instance().set_session (s); /* Session option editor cannot exist across change-of-session */ @@ -193,9 +192,15 @@ ARDOUR_UI::set_session (Session *s) editor_meter_peak_display.hide(); } - if (_session - && _session->master_out() - && _session->master_out()->n_outputs().n(DataType::AUDIO) > 0) { + if (meter_box.get_parent()) { + transport_tearoff_hbox.remove (meter_box); + transport_tearoff_hbox.remove (editor_meter_peak_display); + } + + if (_session && + _session->master_out() && + _session->master_out()->n_outputs().n(DataType::AUDIO) > 0) { + editor_meter = new LevelMeterHBox(_session); editor_meter->set_meter (_session->master_out()->shared_peak_meter().get()); editor_meter->clear_meters(); @@ -226,11 +231,7 @@ ARDOUR_UI::set_session (Session *s) transport_tearoff_hbox.remove (meter_box); transport_tearoff_hbox.remove (editor_meter_peak_display); } - } else if (meter_box.get_parent()) { - transport_tearoff_hbox.remove (meter_box); - transport_tearoff_hbox.remove (editor_meter_peak_display); } - } int |