From 5e0cd4e0020b47a38a4e7f1e65b62b253d125d14 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Fri, 12 Jan 2007 09:04:24 +0000 Subject: [PATCH] Pin fCursorMeasure to song size --- Sources/VLSheetViewSelection.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/VLSheetViewSelection.mm b/Sources/VLSheetViewSelection.mm index 79bf75a..65b035c 100644 --- a/Sources/VLSheetViewSelection.mm +++ b/Sources/VLSheetViewSelection.mm @@ -36,6 +36,8 @@ static VLSong sPasteboard; // Fall through // case kRegionMeasure: + fCursorMeasure = + std::max(0, std::min(fCursorMeasure, [self song]->CountMeasures())); if (fCursorMeasure > fSelEnd) { fSelEnd = fCursorMeasure; [self setNeedsDisplay:YES];