1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-16 16:10:06 +02:00

When deciding which overlays to redraw, account for Leland's recent OSX change

Conflicts:
	src/TrackPanel.cpp
This commit is contained in:
Paul Licameli 2015-08-24 14:18:57 -04:00
parent 38b08fbc8d
commit fcc8c3b167

View File

@ -1255,8 +1255,13 @@ void TrackPanel::TimerUpdateIndicator()
std::pair<wxRect, bool> TrackPanel::GetIndicatorRectangle() std::pair<wxRect, bool> TrackPanel::GetIndicatorRectangle()
{ {
wxRect rect(mLastIndicatorX, 0, 1, mBacking->GetHeight());
#if defined(__WXMAC__)
rect.Inflate(1, 0);
#endif
return std::make_pair( return std::make_pair(
wxRect(mLastIndicatorX, 0, 1, mBacking->GetHeight()), rect,
mLastIndicatorX != mNewIndicatorX mLastIndicatorX != mNewIndicatorX
); );
} }
@ -1371,8 +1376,13 @@ std::pair<wxRect, bool> TrackPanel::GetCursorRectangle()
mNewCursorX = mViewInfo->TimeToPosition(mCursorTime, GetLeftOffset()); mNewCursorX = mViewInfo->TimeToPosition(mCursorTime, GetLeftOffset());
} }
wxRect rect(mLastCursorX, 0, 1, mBacking->GetHeight());
#if defined(__WXMAC__)
rect.Inflate(1, 0);
#endif
return std::make_pair( return std::make_pair(
wxRect(mLastCursorX, 0, 1, mBacking->GetHeight()), rect,
mLastCursorX != mNewCursorX mLastCursorX != mNewCursorX
); );
} }
@ -7520,11 +7530,16 @@ void TrackPanel::TimerUpdateScrubbing()
std::pair<wxRect, bool> TrackPanel::GetScrubSpeedRectangle() std::pair<wxRect, bool> TrackPanel::GetScrubSpeedRectangle()
{ {
wxRect rect(mLastScrubRect);
#if defined(__WXMAC__)
rect.Inflate(1, 0);
#endif
const bool outdated = const bool outdated =
(mLastScrubRect != mNextScrubRect) || (mLastScrubRect != mNextScrubRect) ||
(!mLastScrubRect.IsEmpty() && !ShouldDrawScrubSpeed()); (!mLastScrubRect.IsEmpty() && !ShouldDrawScrubSpeed());
return std::make_pair( return std::make_pair(
mLastScrubRect, rect,
outdated outdated
); );
} }