13
0

prevent infinite loop when calculating tick marks on low zoom levels

This commit is contained in:
Robin Gareus 2016-11-02 17:54:24 +01:00
parent f09e9347e1
commit da32ae4e1f

View File

@ -996,11 +996,11 @@ Editor::metric_get_timecode (std::vector<ArdourCanvas::Ruler::Mark>& marks, gdou
mark.position = pos; mark.position = pos;
marks.push_back (mark); marks.push_back (mark);
++n; ++n;
} }
/* can't use Timecode::increment_hours() here because we may be traversing thousands of hours /* 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). * and doing it 1 hour at a time is just stupid (and slow).
*/ */
timecode.hours += timecode_mark_modulo; timecode.hours += timecode_mark_modulo - (timecode.hours % timecode_mark_modulo);
} }
break; break;
} }