Skip to content

Commit

Permalink
Fix clef order after headers
Browse files Browse the repository at this point in the history
  • Loading branch information
miiizen committed Feb 28, 2025
1 parent 435802e commit b6e814e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/engraving/dom/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2847,14 +2847,20 @@ bool Segment::goesBefore(const Segment* nextSegment) const
}

if (thisIsClef && (nextIsKeySig || nextIsTimeSig)
&& rtick() == Fraction(0, 1) && nextSegment->rtick() == Fraction(0, 1) && !nextIsHeader) {
&& rtick()
== Fraction(0,
1) && nextSegment->rtick() == Fraction(0, 1) && !nextIsHeader && thisMeasureIsStartRepeat && prevMeasureIsEndRepeat) {
// Between repeats
LOGI() << "1. BETWEEN REPEATS";
return true;
}

if ((thisIsKeySig || thisIsTimeSig) && nextIsClef
&& rtick() == Fraction(0, 1) && nextSegment->rtick() == Fraction(0, 1) && !thisIsHeader) {
&& rtick()
== Fraction(0,
1) && nextSegment->rtick() == Fraction(0, 1) && !thisIsHeader && thisMeasureIsStartRepeat && prevMeasureIsEndRepeat) {
// Between repeats
LOGI() << "2. BETWEEN REPEATS";
return false;
}

Expand Down
Binary file added vtest/scores/clefPosition.mscz
Binary file not shown.

0 comments on commit b6e814e

Please sign in to comment.