mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
Use TypeSwitch and track_cast in TrackPanel
This commit is contained in:
@@ -373,26 +373,26 @@ wxAccStatus TrackPanelAx::GetName( int childId, wxString* name )
|
||||
name->Printf(_("Track %d"), TrackNum( t ) );
|
||||
}
|
||||
|
||||
if (t->GetKind() == Track::Label)
|
||||
{
|
||||
/* i18n-hint: This is for screen reader software and indicates that
|
||||
this is a Label track.*/
|
||||
name->Append( wxT(" ") + wxString(_("Label Track")));
|
||||
}
|
||||
else if (t->GetKind() == Track::Time)
|
||||
{
|
||||
/* i18n-hint: This is for screen reader software and indicates that
|
||||
this is a Time track.*/
|
||||
name->Append( wxT(" ") + wxString(_("Time Track")));
|
||||
}
|
||||
t->TypeSwitch(
|
||||
[&](const LabelTrack *) {
|
||||
/* i18n-hint: This is for screen reader software and indicates that
|
||||
this is a Label track.*/
|
||||
name->Append( wxT(" ") + wxString(_("Label Track")));
|
||||
},
|
||||
[&](const TimeTrack *) {
|
||||
/* i18n-hint: This is for screen reader software and indicates that
|
||||
this is a Time track.*/
|
||||
name->Append( wxT(" ") + wxString(_("Time Track")));
|
||||
}
|
||||
#ifdef USE_MIDI
|
||||
else if (t->GetKind() == Track::Note)
|
||||
{
|
||||
/* i18n-hint: This is for screen reader software and indicates that
|
||||
this is a Note track.*/
|
||||
name->Append( wxT(" ") + wxString(_("Note Track")));
|
||||
}
|
||||
,
|
||||
[&](const NoteTrack *) {
|
||||
/* i18n-hint: This is for screen reader software and indicates that
|
||||
this is a Note track.*/
|
||||
name->Append( wxT(" ") + wxString(_("Note Track")));
|
||||
}
|
||||
#endif
|
||||
);
|
||||
|
||||
// LLL: Remove these during "refactor"
|
||||
auto pt = dynamic_cast<PlayableTrack *>(t.get());
|
||||
|
||||
Reference in New Issue
Block a user