mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-28 15:38:48 +01:00
Fix the bounce in play indicator when drag selection snaps to zero width...
... This problem was introduced at 3dec7153a3.
Also fix the mistake of painting to the wrong dc in some new code.
This commit is contained in:
@@ -2129,6 +2129,7 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
||||
wxCoord xx = evt.GetX();
|
||||
wxCoord mousePosX = xx;
|
||||
UpdateQuickPlayPos(mousePosX);
|
||||
HandleSnapping();
|
||||
|
||||
// If not looping, restrict selection to end of project
|
||||
if (!inScrubZone && !evt.ShiftDown()) {
|
||||
@@ -2257,12 +2258,6 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
||||
}
|
||||
}
|
||||
|
||||
HandleSnapping();
|
||||
|
||||
mQuickPlayInd = true;
|
||||
wxClientDC dc(this);
|
||||
DrawQuickPlayIndicator(&dc);
|
||||
|
||||
if (evt.LeftDown())
|
||||
{
|
||||
// Temporarily unlock locked play region
|
||||
@@ -2486,6 +2481,10 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt)
|
||||
mPlayRegionLock = false;
|
||||
}
|
||||
}
|
||||
|
||||
mQuickPlayInd = true;
|
||||
wxClientDC dc(this);
|
||||
DrawQuickPlayIndicator(&dc);
|
||||
}
|
||||
|
||||
void AdornedRulerPanel::UpdateStatusBar(StatusChoice choice)
|
||||
@@ -2762,8 +2761,8 @@ void AdornedRulerPanel::DoDrawBorder(wxDC * dc)
|
||||
if (mShowScrubbing) {
|
||||
// Let's distinguish the scrubbing area by using the same gray as for
|
||||
// selected track control panel.
|
||||
AColor::Medium(&mBackDC, true);
|
||||
mBackDC.DrawRectangle(mScrubZone);
|
||||
AColor::Medium(dc, true);
|
||||
dc->DrawRectangle(mScrubZone);
|
||||
}
|
||||
|
||||
wxRect r = mOuter;
|
||||
|
||||
Reference in New Issue
Block a user