mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-29 06:59:27 +02:00
Bug752: yellow snap lines should erase when mouse-up is not over a track
This commit is contained in:
parent
cfdbc35990
commit
17e3bf7b09
@ -2148,8 +2148,11 @@ void TrackPanel::HandleSelect(wxMouseEvent & event)
|
||||
delete mSnapManager;
|
||||
mSnapManager = NULL;
|
||||
}
|
||||
mSnapLeft = -1;
|
||||
mSnapRight = -1;
|
||||
// Do not draw yellow lines
|
||||
if (mSnapLeft != -1 || mSnapRight != -1) {
|
||||
mSnapLeft = mSnapRight = -1;
|
||||
Refresh(false);
|
||||
}
|
||||
|
||||
SetCapturedTrack( NULL );
|
||||
//Send the new selection state to the undo/redo stack:
|
||||
@ -2846,8 +2849,8 @@ void TrackPanel::StartSelection(int mouseXCoordinate, int trackLeftEdge)
|
||||
bool snappedPoint, snappedTime;
|
||||
if (mSnapManager->Snap(mCapturedTrack, mSelStart, false,
|
||||
&s, &snappedPoint, &snappedTime)) {
|
||||
if (snappedPoint)
|
||||
mSnapLeft = mViewInfo->TimeToPosition(s, trackLeftEdge);
|
||||
//if (snappedPoint)
|
||||
//mSnapLeft = mViewInfo->TimeToPosition(s, trackLeftEdge);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3857,8 +3860,12 @@ void TrackPanel::HandleSlide(wxMouseEvent & event)
|
||||
delete mSnapManager;
|
||||
mSnapManager = NULL;
|
||||
}
|
||||
mSnapLeft = -1;
|
||||
mSnapRight = -1;
|
||||
|
||||
// Do not draw yellow lines
|
||||
if (mSnapLeft != -1 || mSnapRight != -1) {
|
||||
mSnapLeft = mSnapRight = -1;
|
||||
Refresh(false);
|
||||
}
|
||||
|
||||
if (!mDidSlideVertically && mHSlideAmount==0)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user