mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-26 23:33:49 +01:00
Remove unnecessary const_cast
This commit is contained in:
@@ -1081,10 +1081,7 @@ int LabelTrackView::GetSelectedIndex( AudacityProject &project ) const
|
||||
// may make delayed update of mutable mSelIndex after track selection change
|
||||
auto track = FindLabelTrack();
|
||||
if ( track->GetSelected() ||
|
||||
TrackFocus::Get(
|
||||
// unhappy const_cast because because focus may be set if undefined
|
||||
const_cast<AudacityProject&>( project )
|
||||
).Get() == track.get()
|
||||
TrackFocus::Get( project ).Get() == track.get()
|
||||
)
|
||||
return mSelIndex = std::max( -1,
|
||||
std::min<int>( track->GetLabels().size() - 1, mSelIndex ) );
|
||||
|
||||
Reference in New Issue
Block a user