Only delete playback editable at end of playback

This commit is contained in:
Matthias Neeracher 2011-09-12 16:29:31 +02:00
parent 0cd0effb46
commit 1ef77bfd96
3 changed files with 12 additions and 1 deletions

View File

@ -113,6 +113,7 @@
- (void) userEvent:(const VLMIDIUserEvent *)event; - (void) userEvent:(const VLMIDIUserEvent *)event;
- (void) highlightCursor; - (void) highlightCursor;
- (BOOL) hidden; - (BOOL) hidden;
- (void) deleteAtEndOfPlayback;
@end @end
@ -166,6 +167,11 @@
return YES; return YES;
} }
- (void) deleteAtEndOfPlayback
{
[fView setEditTarget:nil];
}
@end @end
@interface NSMenuItem (VLSetStateToOff) @interface NSMenuItem (VLSetStateToOff)

View File

@ -25,6 +25,7 @@
- (BOOL) canExtendSelection:(VLRegion)region; - (BOOL) canExtendSelection:(VLRegion)region;
- (void) extendSelection:(VLLocation)at; - (void) extendSelection:(VLLocation)at;
- (BOOL) hidden; - (BOOL) hidden;
- (void) deleteAtEndOfPlayback;
@end @end

View File

@ -58,6 +58,10 @@
return NO; return NO;
} }
- (void) deleteAtEndOfPlayback
{
}
@end @end
@implementation VLSheetWindow @implementation VLSheetWindow
@ -78,7 +82,7 @@
object:nil queue:oq usingBlock:^(NSNotification *note) { object:nil queue:oq usingBlock:^(NSNotification *note) {
[[[self window] toolbar] validateVisibleItems]; [[[self window] toolbar] validateVisibleItems];
if (VLSoundOut::Instance()->AtBeginning()) if (VLSoundOut::Instance()->AtBeginning())
[self setEditTarget:nil]; // Kill note cursor if we ran to end [editTarget deleteAtEndOfPlayback]; // Kill note cursor if we ran to end
}]; }];
} }
return self; return self;