src/tracks/playabletrack/wavetrack/ui/WaveformView.cpp
/// Handles the selection from the WaveColor submenu of the
/// track menu.
Handles the selection from the WaveColor submenu of the
track menu.
Handles the selection from the WaveColor submenu of the track menu .
void WaveColorMenuTable::OnWaveColorChange(wxCommandEvent & event)
{
   int id = event.GetId();
   wxASSERT(id >= OnInstrument1ID && id <= OnInstrument4ID);
   const auto pTrack = static_cast<WaveTrack*>(mpData->pTrack);
   int newWaveColor = id - OnInstrument1ID;
   AudacityProject *const project = &mpData->project;
   for (auto channel : TrackList::Channels(pTrack))
      channel->SetWaveColorIndex(newWaveColor);
   ProjectHistory::Get( *project )
      .PushState(XO("Changed '%s' to %s")
         .Format( pTrack->GetName(), GetWaveColorStr(newWaveColor) ),
      XO("WaveColor Change"));
   using namespace RefreshCode;
   mpData->result = RefreshAll | FixScrollbars;
}
void WaveColorMenuTable :: OnWaveColorChange ( wxCommandEvent & event ) { int id = event . GetId ( ) ; wxASSERT ( id >= OnInstrument1ID && id <= OnInstrument4ID ) ; const auto pTrack = static_cast < WaveTrack * > ( mpData -> pTrack ) ; int newWaveColor = id - OnInstrument1ID ; AudacityProject * const project = & mpData -> project ; for ( auto channel : TrackList :: Channels ( pTrack ) ) channel -> SetWaveColorIndex ( newWaveColor ) ; ProjectHistory :: Get ( * project ) . PushState ( XO ( " " ) . Format ( pTrack -> GetName ( ) , GetWaveColorStr ( newWaveColor ) ) , XO ( " " ) ) ; using namespace RefreshCode ; mpData -> result = RefreshAll | FixScrollbars ; }
Handles the selection from the WaveColor submenu of the
track menu.
Handles the selection from the WaveColor submenu of the track menu .