1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-29 08:43:56 +01:00

Simplify iterations over TrackPanelCells with range-for

This commit is contained in:
Paul Licameli
2017-06-16 22:57:08 -04:00
parent f94ac4dc43
commit ffbc4d5f90
6 changed files with 14 additions and 16 deletions

View File

@@ -3166,6 +3166,14 @@ void TrackInfo::UpdatePrefs()
} while (textWidth >= allowableWidth);
}
IteratorRange< TrackPanelCellIterator > TrackPanel::Cells()
{
return {
TrackPanelCellIterator( this, true ),
TrackPanelCellIterator( this, false )
};
}
TrackPanelCellIterator::TrackPanelCellIterator(TrackPanel *trackPanel, bool begin)
: mPanel(trackPanel)
, mIter(trackPanel->GetProject())