From 920e7aa0fd2a3fde7f80a322a709fed52feac600 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Mon, 24 Mar 2008 22:48:11 +0000 Subject: [PATCH] Don't interrupt selection in autoscroll --- Sources/VLSheetView.mm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Sources/VLSheetView.mm b/Sources/VLSheetView.mm index bba4d0f..5c78e54 100644 --- a/Sources/VLSheetView.mm +++ b/Sources/VLSheetView.mm @@ -845,6 +845,7 @@ static int8_t sSharpAcc[] = { - (void) mouseMoved:(NSEvent *)event { + NSLog(@"Moved\n"); if ([event modifierFlags] & NSAlphaShiftKeyMask) return; // Keyboard mode, ignore mouse @@ -871,8 +872,9 @@ static int8_t sSharpAcc[] = { - (void) mouseExited:(NSEvent *)event { - [self mouseMoved:event]; + fCursorPitch = VLNote::kNoPitch; [[self window] setAcceptsMouseMovedEvents:NO]; + [self setNeedsDisplay:YES]; } - (void) mouseDown:(NSEvent *)event @@ -898,11 +900,15 @@ static int8_t sSharpAcc[] = { - (void) mouseDragged:(NSEvent *)event { - if (fCursorRegion != kRegionMeasure) + bool inMeasureSelection = fCursorRegion == kRegionMeasure; + + NSLog(@"Dragged\n"); + if (!inMeasureSelection) [super mouseDragged:event]; [self autoscroll:event]; - if (fCursorRegion == kRegionMeasure) + if (inMeasureSelection) [self adjustSelection:event]; + NSLog(@"Region: %d\n", fCursorRegion); } - (void) keyDown:(NSEvent *)event