Skip to content

Commit

Permalink
Fix GH#21529: Insert time in all parts when splitting measure
Browse files Browse the repository at this point in the history
Backport of musescore#23672
  • Loading branch information
miiizen authored and Jojo-Schmitz committed Jul 24, 2024
1 parent 13d664d commit 6d20e0c
Show file tree
Hide file tree
Showing 5 changed files with 3,913 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1790,9 +1790,9 @@ void Measure::adjustToLen(Fraction nf, bool appendRestsIfNecessary)
startTick += diff;

score()->undoInsertTime(startTick, diff);
score()->undo(new InsertTime(score(), startTick, diff));

for (Score* s : score()->scoreList()) {
s->undo(new InsertTime(s, startTick, diff));
Measure* m = s->tick2measure(tick());
s->undo(new ChangeMeasureLen(m, nf));
if (nl > ol) {
Expand Down
2 changes: 1 addition & 1 deletion libmscore/noteentry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,9 @@ void Score::localInsertChord(const Position& pos)
// The approach is similar to that in Measure::adjustToLen() but does
// insert time to the middle of the measure rather than to the end.
undoInsertTime(tick, len);
undo(new InsertTime(this, tick, len));

for (Score* score : scoreList()) {
undo(new InsertTime(score, tick, len));
Measure* m = score->tick2measure(tick);
undo(new ChangeMeasureLen(m, targetMeasureLen));
Segment* scoreSeg = m->tick2segment(tick);
Expand Down
Loading

0 comments on commit 6d20e0c

Please sign in to comment.