summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_rulers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-11-23 14:34:46 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2014-11-23 14:36:38 +0200
commitdcf632d99f38a581c7b54d34abc421e0acec24e9 (patch)
treefa472301b288e7bb0c679f69ea97b814d6e0aab6 /gtk2_ardour/editor_rulers.cc
parent57c1b6e261076cae9b61e74aa0aff47a9f296c0f (diff)
assign minsec_ruler_scale and minsec_mark_modulo when zoomed very far out
Avoids crash when computing % minsec_mark_modulo.
Diffstat (limited to 'gtk2_ardour/editor_rulers.cc')
-rw-r--r--gtk2_ardour/editor_rulers.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 6e2267bf62..6506b4633f 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -1742,11 +1742,11 @@ Editor::set_minsec_ruler_scale (framepos_t lower, framepos_t upper)
minsec_ruler_scale = minsec_show_hours;
minsec_mark_modulo = 2;
} else {
-
- /* not possible if framepos_t is a 32 bit quantity */
-
minsec_mark_interval = 4 * 60 * 60 * fr; /* show 4 hrs */
+ minsec_ruler_scale = minsec_show_hours;
+ minsec_mark_modulo = 4;
}
+
minsec_nmarks = 2 + (range / minsec_mark_interval);
}