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

Play head is now drawn from the top of track panel to the bottom

This commit is contained in:
Vitaly Sverchinsky 2021-07-15 14:38:17 +03:00 committed by Panagiotis Vasilopoulos
parent 1190041f3c
commit 4f43326c77
No known key found for this signature in database
GPG Key ID: FD806FDB3B2C5270

View File

@ -100,24 +100,7 @@ void PlayIndicatorOverlayBase::Draw(OverlayPanel &panel, wxDC &dc)
if(auto tp = dynamic_cast<TrackPanel*>(&panel)) { if(auto tp = dynamic_cast<TrackPanel*>(&panel)) {
wxASSERT(mIsMaster); wxASSERT(mIsMaster);
// Draw indicator in all visible tracks AColor::Line(dc, mLastIndicatorX, tp->GetRect().GetTop(), mLastIndicatorX, tp->GetRect().GetBottom());
tp->VisitCells( [&]( const wxRect &rect, TrackPanelCell &cell ) {
const auto pTrackView = dynamic_cast<TrackView*>(&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());
}
);
} );
} }
else if(auto ruler = dynamic_cast<AdornedRulerPanel*>(&panel)) { else if(auto ruler = dynamic_cast<AdornedRulerPanel*>(&panel)) {
wxASSERT(!mIsMaster); wxASSERT(!mIsMaster);