mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Fix selection status
This commit is contained in:
parent
b8e4c614f3
commit
09c3d25dcf
|
@ -838,21 +838,24 @@ const float kSemiFloor = -1.0f*kLineH;
|
||||||
|
|
||||||
- (void) mouseDown:(NSEvent *)event
|
- (void) mouseDown:(NSEvent *)event
|
||||||
{
|
{
|
||||||
fSelEnd = -1;
|
|
||||||
switch ([self findRegionForEvent:event]) {
|
switch ([self findRegionForEvent:event]) {
|
||||||
case kRegionNote:
|
case kRegionNote:
|
||||||
|
fSelEnd = -1;
|
||||||
[self addNoteAtCursor];
|
[self addNoteAtCursor];
|
||||||
break;
|
break;
|
||||||
case kRegionChord:
|
case kRegionChord:
|
||||||
|
fSelEnd = -1;
|
||||||
[self editChord];
|
[self editChord];
|
||||||
break;
|
break;
|
||||||
case kRegionLyrics:
|
case kRegionLyrics:
|
||||||
|
fSelEnd = -1;
|
||||||
[self editLyrics];
|
[self editLyrics];
|
||||||
break;
|
break;
|
||||||
case kRegionMeasure:
|
case kRegionMeasure:
|
||||||
[self editSelection:([event modifierFlags] & NSShiftKeyMask) != 0];
|
[self editSelection:([event modifierFlags] & NSShiftKeyMask) != 0];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
fSelEnd = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ VLSequenceCallback(
|
||||||
|
|
||||||
- (void)editSelection:(BOOL)extend
|
- (void)editSelection:(BOOL)extend
|
||||||
{
|
{
|
||||||
if (extend && fSelStart > -1) {
|
if (extend && fSelEnd > -1) {
|
||||||
if (fCursorMeasure > fSelEnd)
|
if (fCursorMeasure > fSelEnd)
|
||||||
fSelEnd = fCursorMeasure;
|
fSelEnd = fCursorMeasure;
|
||||||
else if (fCursorMeasure < fSelStart)
|
else if (fCursorMeasure < fSelStart)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user