1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-03 17:39:25 +02:00

Report selectedness of all tracks, not just WaveTracks.

(Suggested by Steve Daulton).
This commit is contained in:
James Crook 2018-09-03 22:02:15 +01:00
parent 1627194aff
commit 7d0839393b

View File

@ -260,6 +260,10 @@ bool GetInfoCommand::SendTracks(const CommandContext & context)
context.StartStruct(); context.StartStruct();
context.AddItem( trk->GetName(), "name" ); context.AddItem( trk->GetName(), "name" );
context.AddBool( (trk == fTrack), "focused"); context.AddBool( (trk == fTrack), "focused");
context.AddBool( trk->GetSelected(), "selected" );
//JKC: Possibly add these two later...
//context.AddItem( trk->GetKind(), "kind" );
//context.AddItem( trk->GetHeight(), "height" );
auto t = dynamic_cast<WaveTrack*>( trk ); auto t = dynamic_cast<WaveTrack*>( trk );
if( t ) if( t )
{ {
@ -267,7 +271,6 @@ bool GetInfoCommand::SendTracks(const CommandContext & context)
context.AddItem( t->GetEndTime(), "end" ); context.AddItem( t->GetEndTime(), "end" );
context.AddItem( t->GetPan() , "pan"); context.AddItem( t->GetPan() , "pan");
context.AddItem( t->GetGain() , "gain"); context.AddItem( t->GetGain() , "gain");
context.AddBool( t->GetSelected(), "selected" );
context.AddBool( t->GetLinked(), "linked"); context.AddBool( t->GetLinked(), "linked");
context.AddBool( t->GetSolo(), "solo" ); context.AddBool( t->GetSolo(), "solo" );
context.AddBool( t->GetMute(), "mute"); context.AddBool( t->GetMute(), "mute");