mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
nonvirtual reimplementation of CellularPanel::FindRect using nodes
This commit is contained in:
@@ -2088,20 +2088,6 @@ std::shared_ptr<TrackPanelNode> TrackPanel::Root()
|
||||
return std::make_shared< MainGroup >( *this );
|
||||
}
|
||||
|
||||
wxRect TrackPanel::FindRect( const TrackPanelCell &cell )
|
||||
{
|
||||
auto range = Cells();
|
||||
auto end = range.second,
|
||||
iter = std::find_if( range.first, end,
|
||||
[&]( const decltype(*end) &pair )
|
||||
{ return pair.first.get() == &cell; }
|
||||
);
|
||||
if (iter == end)
|
||||
return {};
|
||||
else
|
||||
return (*iter).second;
|
||||
}
|
||||
|
||||
// This finds the rectangle of a given track (including all channels),
|
||||
// either that of the label 'adornment' or the track itself
|
||||
// The given track is assumed to be the first channel
|
||||
|
||||
Reference in New Issue
Block a user