diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-13 10:52:15 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-12-13 10:52:15 -0500 |
commit | fd1d2d804faa1a1fcb75fe12308f55bf911f6f2a (patch) | |
tree | 875bc33cccb46d52709930df5487988fe3512b5b /gtk2_ardour/ardour_ui_options.cc | |
parent | fd1eb73ef21e8a938e34ca49378a866c381c48e3 (diff) |
fix logic for display of transport bar meters
Always remove from parent (if there is one), then repack if necessary.
Diffstat (limited to 'gtk2_ardour/ardour_ui_options.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_options.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index c531f006e2..423b685bad 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -401,14 +401,19 @@ ARDOUR_UI::parameter_changed (std::string p) start_clocking (); } else if (p == "show-editor-meter") { bool show = Config->get_show_editor_meter(); - if (editor_meter && show) { - transport_tearoff_hbox.pack_start (meter_box, false, false); - transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false); - meter_box.show(); - editor_meter_peak_display.show(); - } else if (editor_meter && !show && meter_box.get_parent()) { - transport_tearoff_hbox.remove (meter_box); - transport_tearoff_hbox.remove (editor_meter_peak_display); + + if (editor_meter) { + if (meter_box.get_parent()) { + transport_tearoff_hbox.remove (meter_box); + transport_tearoff_hbox.remove (editor_meter_peak_display); + } + + if (show) { + transport_tearoff_hbox.pack_start (meter_box, false, false); + transport_tearoff_hbox.pack_start (editor_meter_peak_display, false, false); + meter_box.show(); + editor_meter_peak_display.show(); + } } } } |