Skip to content

Commit

Permalink
fix #38571: Clef displayed incorrectly after change at beginning of s…
Browse files Browse the repository at this point in the history
…ystem starting with mmrest
  • Loading branch information
lasconic committed Nov 9, 2014
1 parent d5991a4 commit 795c8cb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions libmscore/undo.cpp
Expand Up @@ -582,6 +582,16 @@ void Score::undoChangeClef(Staff* ostaff, Segment* seg, ClefType st)
}
clef->setGenerated(false);
score->undo(new ChangeClefType(clef, cp, tp));
// change the clef in the mmRest if any
if (measure->hasMMRest()) {
Measure* mmMeasure = measure->mmRest();
Segment* mmDestSeg = mmMeasure->findSegment(Segment::Type::Clef, tick);
if (mmDestSeg) {
Clef* mmClef = static_cast<Clef*>(mmDestSeg->element(clef->track()));
if (mmClef)
score->undo(new ChangeClefType(mmClef, cp, tp));
}
}
}
else {
if (gclef) {
Expand Down Expand Up @@ -3464,6 +3474,8 @@ void ChangeClefType::flip()

concertClef = ocl;
transposingClef = otc;
// layout the clef to align the currentClefType with the actual one immediately
clef->layout();
}

//---------------------------------------------------------
Expand Down

0 comments on commit 795c8cb

Please sign in to comment.