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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user