1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-20 21:21:25 +01:00

Correct flashing of the pin when dragged to extreme left or right

This commit is contained in:
Paul Licameli
2018-08-06 21:03:37 -04:00
parent 27dc8ffead
commit 54807caa1a

View File

@@ -153,10 +153,13 @@ void PlayIndicatorOverlay::OnTimer(wxCommandEvent &event)
// Calculate the horizontal position of the indicator
const double playPos = viewInfo.mRecentStreamTime;
// Use a small tolerance to avoid flicker of play head pinned all the way
// left or right
const auto tolerance = kTimerInterval / 1000.0;
bool onScreen = playPos >= 0.0 &&
between_incexc(viewInfo.h,
between_incexc(viewInfo.h - tolerance,
playPos,
mProject->GetScreenEndTime());
mProject->GetScreenEndTime() + tolerance);
// This displays the audio time, too...
mProject->TP_DisplaySelection();