1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-16 03:15:27 +01:00

Replace uses of TrackPanel::Cells() with CellularPanel::VisitCells()

This commit is contained in:
Paul Licameli
2018-11-01 12:55:06 -04:00
parent 01551913f0
commit 005abb06d6
5 changed files with 19 additions and 31 deletions

View File

@@ -33,7 +33,6 @@
#include "RefreshCode.h"
#include "Snap.h"
#include "TrackPanel.h"
#include "TrackPanelCellIterator.h"
#include "TrackPanelMouseEvent.h"
#include "UIHandle.h"
#include "prefs/TracksBehaviorsPrefs.h"
@@ -328,20 +327,19 @@ void AdornedRulerPanel::QuickPlayIndicatorOverlay::Draw(
;
// Draw indicator in all visible tracks
for ( const auto &data : static_cast<TrackPanel&>(panel).Cells() )
{
Track *const pTrack = dynamic_cast<Track*>(data.first.get());
if (!pTrack)
continue;
const wxRect &rect = data.second;
static_cast<TrackPanel&>(panel)
.VisitCells( [&]( const wxRect &rect, TrackPanelCell &cell ) {
const auto pTrack = dynamic_cast<Track*>(&cell);
if (!pTrack)
return;
// Draw the NEW indicator in its NEW location
AColor::Line(dc,
mOldQPIndicatorPos,
rect.GetTop(),
mOldQPIndicatorPos,
rect.GetBottom());
}
// Draw the NEW indicator in its NEW location
AColor::Line(dc,
mOldQPIndicatorPos,
rect.GetTop(),
mOldQPIndicatorPos,
rect.GetBottom());
} );
}
}