1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-04 14:39:08 +02:00

Restore turning-off highlighting label glyph when mouse leaves it...

But inelegantly!

It was broken at commit 828d9c3ccd3795bb665aaa59694ad89590d019bc

Nicer solutions in progres...
This commit is contained in:
Paul Licameli 2017-06-30 00:14:41 -04:00
parent dc1193a0af
commit 8f50940b91
2 changed files with 8 additions and 1 deletions

View File

@ -30,10 +30,13 @@ HitTestResult LabelTrack::DetailedHitTest
// Try label movement handles first
result = LabelGlyphHandle::HitTest(event, Pointer<LabelTrack>(this));
auto refresh = result.preview.refreshCode; // kludge
if ( !result.handle )
if ( !result.handle ) {
// Missed glyph, try text box
result = LabelTextHandle::HitTest(event, Pointer<LabelTrack>(this));
result.preview.refreshCode |= refresh; // kludge
}
return result;
}

View File

@ -43,6 +43,9 @@ HitTestResult Track::HitTest
// If there is no detailed hit for the subclass, there are still some
// general cases.
// Label track kludge!
auto refresh = result.preview.refreshCode;
// Sliding applies in more than one track type.
if ( !result.handle && !isMultiTool && currentTool == slideTool )
result = TimeShiftHandle::HitAnywhere(pProject);
@ -56,6 +59,7 @@ HitTestResult Track::HitTest
if ( !result.handle && ( isMultiTool || currentTool == selectTool) )
result = SelectHandle::HitTest(event, pProject, Pointer(this));
result.preview.refreshCode |= refresh;
return result;
}