Skip to content

Fix #27058: Mute settings are broken in parts whose instruments were deleted and then restored with Undo #29237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/notation/internal/masternotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,8 @@ void MasterNotation::updateExcerpts()
excerptNotation->notation()->elements()->msScore()->doLayout();
}

initNotationSoloMuteState(excerptNotation->notation());

updatedExcerpts.push_back(excerptNotation);
}

Expand Down
6 changes: 5 additions & 1 deletion src/playback/internal/playbackcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 +1286,11 @@ void PlaybackController::onTrackNewlyAdded(const InstrumentTrackId& instrumentTr
if (notation == m_notation || notation->soloMuteState()->trackSoloMuteStateExists(instrumentTrackId)) {
continue;
}
const INotationSoloMuteState::SoloMuteState soloMuteState = { /*mute*/ true, /*solo*/ false };

const Part* part = notation->parts()->part(instrumentTrackId.partId);
const bool shouldMute = !part || !part->show();

const INotationSoloMuteState::SoloMuteState soloMuteState = { shouldMute, /*solo*/ false };
notation->soloMuteState()->setTrackSoloMuteState(instrumentTrackId, soloMuteState);
}
}
Expand Down
Loading