Skip to content

Commit

Permalink
MMRest width correction
Browse files Browse the repository at this point in the history
Don't assign additional width to mmrests of less than 2 bars.
  • Loading branch information
mike-spa committed Mar 21, 2023
1 parent 42b2523 commit a746361
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engraving/libmscore/segment.cpp
Expand Up @@ -2845,7 +2845,8 @@ double Segment::computeDurationStretch(Segment* prevSeg, Fraction minTicks, Frac
static constexpr double longNoteThreshold = Fraction(1, 16).toDouble();

if (measure()->isMMRest() && isChordRestType()) { // This is an MM rest segment
int count = measure()->mmRestCount();
static constexpr int minMMRestCount = 2; // MMRests with less bars than this don't receive additional spacing
int count =std::max(measure()->mmRestCount() - minMMRestCount, 0);
Fraction timeSig = measure()->timesig();
curTicks = timeSig + Fraction(count, timeSig.denominator());
}
Expand Down

0 comments on commit a746361

Please sign in to comment.