From da32ae4e1f25780d4513bf25b9be35ae2b84ac6b Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 2 Nov 2016 17:54:24 +0100 Subject: [PATCH] prevent infinite loop when calculating tick marks on low zoom levels --- gtk2_ardour/editor_rulers.cc | 10 +++++----- 1 file 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& 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; }