diff --git a/Sources/VLDocument.h b/Sources/VLDocument.h index 7383db8..30fd20d 100644 --- a/Sources/VLDocument.h +++ b/Sources/VLDocument.h @@ -86,6 +86,7 @@ enum { - (void) setRepeatVolta:(int)repeatVolta; - (void) playSong; +- (void) endSong; - (NSURL *) tmpURL; - (NSURL *) workURL; diff --git a/Sources/VLDocument.mm b/Sources/VLDocument.mm index 40f5e24..081d749 100644 --- a/Sources/VLDocument.mm +++ b/Sources/VLDocument.mm @@ -490,6 +490,11 @@ [self setPlayElements:[self playElements]]; } +- (void) endSong +{ + musicSequence = nil; +} + - (void) playWithGroove:(NSString *)groove inSections:(NSRange)sections { NSString * savedGroove = songGroove; diff --git a/Sources/VLSheetView.mm b/Sources/VLSheetView.mm index c807b35..fafaf76 100644 --- a/Sources/VLSheetView.mm +++ b/Sources/VLSheetView.mm @@ -834,6 +834,8 @@ const float kSemiFloor = -1.0f*kLineH; - (void) mouseDown:(NSEvent *)event { + [[self document] endSong]; + BOOL extend = ([event modifierFlags] & NSShiftKeyMask) != 0; VLRegion region = [self findRegionForEvent:event]; if (extend && [[self editTarget] canExtendSelection:region])