Skip to content

Commit

Permalink
Fix #316524: Improve algorithm for Add/Remove System Breaks command
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcclinch committed Feb 4, 2021
1 parent 78784d4 commit 9893cb7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libmscore/cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,7 @@ void Score::addRemoveBreaks(int interval, bool lock)
if (mm == lastMeasure)
break;
// skip if it already has a break
if (m->lineBreak() || m->pageBreak())
if (m->lineBreak() || m->pageBreak() || m->sectionBreak())
continue;
// add break if last measure of system
if (mm->system() && mm->system()->lastMeasure() == mm)
Expand All @@ -3532,7 +3532,7 @@ void Score::addRemoveBreaks(int interval, bool lock)
if (mm == lastMeasure)
break;
// found place for break; add if not already one present
if (!(m->lineBreak() || m->pageBreak()))
if (!(m->lineBreak() || m->pageBreak() || m->sectionBreak()))
m->undoSetLineBreak(true);
// reset count
count = 0;
Expand All @@ -3541,6 +3541,10 @@ void Score::addRemoveBreaks(int interval, bool lock)
// remove line break if present in wrong place
m->undoSetLineBreak(false);
}
else if (m->pageBreak() || m->sectionBreak()) {
// reset count
count = 0;
}
}
}

Expand Down

0 comments on commit 9893cb7

Please sign in to comment.