| 104 | } |
| 105 | |
| 106 | bool SetTrackStatusCommand::ApplyInner(const CommandContext & context, Track &t) |
| 107 | { |
| 108 | //auto wt = dynamic_cast<WaveTrack *>(t); |
| 109 | //auto pt = dynamic_cast<PlayableTrack *>(t); |
| 110 | |
| 111 | if (bHasTrackName) |
| 112 | t.SetName(mTrackName); |
| 113 | |
| 114 | if (bHasSelected) |
| 115 | t.SetSelected(bSelected); |
| 116 | |
| 117 | if (bHasFocused) { |
| 118 | auto &trackFocus = TrackFocus::Get(context.project); |
| 119 | if (bFocused) |
| 120 | trackFocus.Set(&t); |
| 121 | else if (&t == trackFocus.Get()) |
| 122 | trackFocus.Set(nullptr); |
| 123 | } |
| 124 | return true; |
| 125 | } |
| 126 | |
| 127 | |
| 128 |
nothing calls this directly
no test coverage detected