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
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}