Reset song on mouse click

This commit is contained in:
Matthias Neeracher 2012-08-19 00:30:50 +02:00
parent 7831732497
commit 15d4100244
3 changed files with 8 additions and 0 deletions

View File

@ -86,6 +86,7 @@ enum {
- (void) setRepeatVolta:(int)repeatVolta;
- (void) playSong;
- (void) endSong;
- (NSURL *) tmpURL;
- (NSURL *) workURL;

View File

@ -490,6 +490,11 @@
[self setPlayElements:[self playElements]];
}
- (void) endSong
{
musicSequence = nil;
}
- (void) playWithGroove:(NSString *)groove inSections:(NSRange)sections
{
NSString * savedGroove = songGroove;

View File

@ -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])