From 1ef77bfd964d2e9116aad41992afd25deecdf617 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 12 Sep 2011 16:29:31 +0200 Subject: [PATCH] Only delete playback editable at end of playback --- Sources/VLSheetViewSelection.mm | 6 ++++++ Sources/VLSheetWindow.h | 1 + Sources/VLSheetWindow.mm | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Sources/VLSheetViewSelection.mm b/Sources/VLSheetViewSelection.mm index 2150a31..1372d2d 100644 --- a/Sources/VLSheetViewSelection.mm +++ b/Sources/VLSheetViewSelection.mm @@ -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) diff --git a/Sources/VLSheetWindow.h b/Sources/VLSheetWindow.h index a4708f3..c723113 100644 --- a/Sources/VLSheetWindow.h +++ b/Sources/VLSheetWindow.h @@ -25,6 +25,7 @@ - (BOOL) canExtendSelection:(VLRegion)region; - (void) extendSelection:(VLLocation)at; - (BOOL) hidden; +- (void) deleteAtEndOfPlayback; @end diff --git a/Sources/VLSheetWindow.mm b/Sources/VLSheetWindow.mm index c6ff39d..ae13d6f 100644 --- a/Sources/VLSheetWindow.mm +++ b/Sources/VLSheetWindow.mm @@ -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;