Pin fCursorMeasure to song size

This commit is contained in:
Matthias Neeracher 2007-01-12 09:04:24 +00:00
parent 4c5f4dbd60
commit 5e0cd4e002

View File

@ -36,6 +36,8 @@ static VLSong sPasteboard;
// Fall through // Fall through
// //
case kRegionMeasure: case kRegionMeasure:
fCursorMeasure =
std::max(0, std::min<int>(fCursorMeasure, [self song]->CountMeasures()));
if (fCursorMeasure > fSelEnd) { if (fCursorMeasure > fSelEnd) {
fSelEnd = fCursorMeasure; fSelEnd = fCursorMeasure;
[self setNeedsDisplay:YES]; [self setNeedsDisplay:YES];