1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-25 08:58:06 +02:00

Fix the bounce in play indicator when drag selection snaps to zero width...

... This problem was introduced at 3dec7153a30ce58d23e42d122362cd6f86c37ca8.

Also fix the mistake of painting to the wrong dc in some new code.
This commit is contained in:
Paul Licameli 2016-04-30 09:47:09 -04:00
parent 009884575c
commit b30093a606

View File

@ -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;