X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui_options.cc;h=e1435f7a8dae4dc65e479a11ebe6d9237b123bf2;hb=49d939777056bf388841298e28494dad100d868e;hp=22f88114d98ad5b0f41d0725317f56a1a4aa33c9;hpb=fa22520fd257f166c00615e7e40ec10c9e29b948;p=ardour.git diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 22f88114d9..e1435f7a8d 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -403,14 +403,19 @@ ARDOUR_UI::parameter_changed (std::string p) ArdourCanvas::WaveView::set_global_gradient_depth (config()->get_waveform_gradient_depth()); } 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(); + } } } }