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) highlightCursor;
- (BOOL) hidden;
- (void) deleteAtEndOfPlayback;
@end
@ -166,6 +167,11 @@
return YES;
}
- (void) deleteAtEndOfPlayback
{
[fView setEditTarget:nil];
}
@end
@interface NSMenuItem (VLSetStateToOff)

View File

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

View File

@ -58,6 +58,10 @@
return NO;
}
- (void) deleteAtEndOfPlayback
{
}
@end
@implementation VLSheetWindow
@ -78,7 +82,7 @@
object:nil queue:oq usingBlock:^(NSNotification *note) {
[[[self window] toolbar] validateVisibleItems];
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;