From 4f43326c7714ec22251d1f175ddda2e8452bf5f0 Mon Sep 17 00:00:00 2001 From: Vitaly Sverchinsky Date: Thu, 15 Jul 2021 14:38:17 +0300 Subject: [PATCH] Play head is now drawn from the top of track panel to the bottom --- src/tracks/ui/PlayIndicatorOverlay.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/tracks/ui/PlayIndicatorOverlay.cpp b/src/tracks/ui/PlayIndicatorOverlay.cpp index 6d1fe64f7..8be786b2a 100644 --- a/src/tracks/ui/PlayIndicatorOverlay.cpp +++ b/src/tracks/ui/PlayIndicatorOverlay.cpp @@ -100,24 +100,7 @@ void PlayIndicatorOverlayBase::Draw(OverlayPanel &panel, wxDC &dc) if(auto tp = dynamic_cast(&panel)) { wxASSERT(mIsMaster); - // Draw indicator in all visible tracks - tp->VisitCells( [&]( const wxRect &rect, TrackPanelCell &cell ) { - const auto pTrackView = dynamic_cast(&cell); - if (pTrackView) pTrackView->FindTrack()->TypeSwitch( - [](LabelTrack *) { - // Don't draw the indicator in label tracks - }, - [&](Track *) { - // Draw the NEW indicator in its NEW location - // AColor::Line includes both endpoints so use GetBottom() - AColor::Line(dc, - mLastIndicatorX, - rect.GetTop(), - mLastIndicatorX, - rect.GetBottom()); - } - ); - } ); + AColor::Line(dc, mLastIndicatorX, tp->GetRect().GetTop(), mLastIndicatorX, tp->GetRect().GetBottom()); } else if(auto ruler = dynamic_cast(&panel)) { wxASSERT(!mIsMaster);