summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-02 14:51:53 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-02 14:51:53 +0000
commit6d46299df3430166f630b615cd6fde36dad7788e (patch)
tree67f696c3335e432cdfd756b86e68fe63a671dd56 /gtk2_ardour/editor_ops.cc
parent1cb5aed0ce24605d16684e3d49167c81b8c83587 (diff)
MCP: another patch from rodrigo:
* setting a (arbitraty) limit to zoom out to prevent segfaults because out of memory condition; * setting initial update of master fader, and read, play and stop leds on the Mackie; * changed the timecode display char selection for update algorithm as chars are sent one by one and not all right most; * implemented method of showing timecode at the mackie to better deal with the differences between Ardour's foramts and Mackie's, i.e, use spaces in place of the zeros that had no meaning; * preventing timecode display updates when the surface isn't yet active. git-svn-id: svn://localhost/ardour2/branches/3.0@12541 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 8b83a9ca70..ec6a6463b7 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1369,6 +1369,13 @@ Editor::temporal_zoom (gdouble fpu)
}
nfpu = fpu;
+
+ // Imposing an arbitrary limit to zoom out as too much zoom out produces
+ // segfaults for lack of memory. If somebody decides this is not high enough I
+ // believe it can be raisen to higher values but some limit must be in place.
+ if (nfpu > 8e+08) {
+ nfpu = 8e+08;
+ }
new_page_size = (framepos_t) floor (_canvas_width * nfpu);
half_page_size = new_page_size / 2;