Skip to content
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

Update drum staff when editing kit #19335

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

miiizen
Copy link
Contributor

@miiizen miiizen commented Sep 8, 2023

Resolves: #18886

Opted for score()->setLayout() over score()->layoutAll() to only re-layout percussion staves

  • I signed the CLA
  • The title of the PR describes the problem it addresses
  • Each commit's message describes its purpose and effects, and references the issue it resolves
  • If changes are extensive, there is a sequence of easily reviewable commits
  • The code in the PR follows the coding rules
  • There are no unnecessary changes
  • The code compiles and runs on my machine, preferably after each commit individually
  • I created a unit test or vtest to verify the changes I made (if applicable)

@@ -626,6 +626,10 @@ void NotationParts::replaceDrumset(const InstrumentKey& instrumentKey, const Dru

score()->undo(new mu::engraving::ChangeDrumset(instrument, &newDrumset));

if (part->staves().size() > 0) {
score()->setLayout(Fraction(0, 1), score()->endTick(), part->staves().front()->idx(), part->staves().back()->idx());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this need to be done inside the engraving module, so that it is also triggered on undo/redo?

@zacjansheski
Copy link
Contributor

Tested on Mac OS 11.6.5, Ubuntu 20.04.6, Windows 11
#18886 FIXED

@RomanPudashkin RomanPudashkin merged commit 04ceda9 into musescore:master Sep 12, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Already written noteheads do not update after updating in edit drumset
5 participants