Skip to content

Commit 8200770

Browse files
Fix: tracks in custom parts no longer get muted when undoing instrument deletion
1 parent 6f34502 commit 8200770

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/playback/internal/playbackcontroller.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,11 @@ void PlaybackController::onTrackNewlyAdded(const InstrumentTrackId& instrumentTr
12861286
if (notation == m_notation || notation->soloMuteState()->trackSoloMuteStateExists(instrumentTrackId)) {
12871287
continue;
12881288
}
1289-
const INotationSoloMuteState::SoloMuteState soloMuteState = { /*mute*/ true, /*solo*/ false };
1289+
1290+
const Part* part = notation->parts()->part(instrumentTrackId.partId);
1291+
const bool shouldMute = !part || !part->show();
1292+
1293+
const INotationSoloMuteState::SoloMuteState soloMuteState = { shouldMute, /*solo*/ false };
12901294
notation->soloMuteState()->setTrackSoloMuteState(instrumentTrackId, soloMuteState);
12911295
}
12921296
}

0 commit comments

Comments
 (0)