summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_rulers.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-11-02 17:54:24 +0100
committerRobin Gareus <robin@gareus.org>2016-11-02 17:54:24 +0100
commitda32ae4e1f25780d4513bf25b9be35ae2b84ac6b (patch)
tree584eda40a4f1261c50f29a312b3afb363c93fe37 /gtk2_ardour/editor_rulers.cc
parentf09e9347e140d8b0151dd1bf1b5f91e473674699 (diff)
prevent infinite loop when calculating tick marks on low zoom levels
Diffstat (limited to 'gtk2_ardour/editor_rulers.cc')
-rw-r--r--gtk2_ardour/editor_rulers.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 2f12604872..4424546296 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -996,11 +996,11 @@ Editor::metric_get_timecode (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdou
mark.position = pos;
marks.push_back (mark);
++n;
- }
- /* can't use Timecode::increment_hours() here because we may be traversing thousands of hours
- and doing it 1 hour at a time is just stupid (and slow).
- */
- timecode.hours += timecode_mark_modulo;
+ }
+ /* can't use Timecode::increment_hours() here because we may be traversing thousands of hours
+ * and doing it 1 hour at a time is just stupid (and slow).
+ */
+ timecode.hours += timecode_mark_modulo - (timecode.hours % timecode_mark_modulo);
}
break;
}