summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_options.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-12-23 15:35:49 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2013-12-23 15:35:49 -0500
commit84f55440a3c6317dd2ab5d7e3d638016609e4d03 (patch)
tree2329f57523432a698f99927a2f070555fd31fe20 /gtk2_ardour/ardour_ui_options.cc
parente1bca03857070ba390bba729933c2d72ad5169fd (diff)
parentdc7878760da040ad74b077318d2e9868d427199a (diff)
fix redrawing of canvas with an optimized build
Best guess right now is that optimization does something bad when ceil() is called twice on a very large dbl-precision number, which results in a zero (empty) redraw area. Without the removal of the redundant ceil & floor functions, no expose events would be delivered to the canvas in an optimized build during drags (and maybe more).
Diffstat (limited to 'gtk2_ardour/ardour_ui_options.cc')
-rw-r--r--gtk2_ardour/ardour_ui_options.cc21
1 files changed, 13 insertions, 8 deletions
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();
+ }
}
}
}