mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29:41 +02:00
Remove unnecessary const_cast
This commit is contained in:
parent
dffe3155b0
commit
92b857d551
@ -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 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user