Skip to content

Commit

Permalink
fix #287841: Crash when adding tempo marking on multimeasure rest
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcclinch committed Apr 22, 2019
1 parent ec75e63 commit 792633f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mscore/menus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1534,6 +1534,17 @@ void MuseScore::addTempo()
cs->undoAddElement(tt);
cs->select(tt, SelectType::SINGLE, 0);
cs->endCmd();
Measure* m = tt->findMeasure();
if (m && m->hasMMRest() && tt->links()) {
Measure* mmRest = m->mmRest();
for (ScoreElement* se : *tt->links()) {
TempoText* tt1 = toTempoText(se);
if (tt != tt1 && tt1->findMeasure() == mmRest) {
tt = tt1;
break;
}
}
}
cv->startEditMode(tt);
}

Expand Down

0 comments on commit 792633f

Please sign in to comment.