Fix selection status

This commit is contained in:
Matthias Neeracher 2011-09-08 04:09:24 +02:00
parent b8e4c614f3
commit 09c3d25dcf
2 changed files with 5 additions and 2 deletions

View File

@ -838,21 +838,24 @@ const float kSemiFloor = -1.0f*kLineH;
- (void) mouseDown:(NSEvent *)event
{
fSelEnd = -1;
switch ([self findRegionForEvent:event]) {
case kRegionNote:
fSelEnd = -1;
[self addNoteAtCursor];
break;
case kRegionChord:
fSelEnd = -1;
[self editChord];
break;
case kRegionLyrics:
fSelEnd = -1;
[self editLyrics];
break;
case kRegionMeasure:
[self editSelection:([event modifierFlags] & NSShiftKeyMask) != 0];
break;
default:
fSelEnd = -1;
break;
}
}

View File

@ -111,7 +111,7 @@ VLSequenceCallback(
- (void)editSelection:(BOOL)extend
{
if (extend && fSelStart > -1) {
if (extend && fSelEnd > -1) {
if (fCursorMeasure > fSelEnd)
fSelEnd = fCursorMeasure;
else if (fCursorMeasure < fSelStart)