Skip to content

Commit

Permalink
Fix #315014: Cutaway courtesy clefs in 3.6 don't show before time sig…
Browse files Browse the repository at this point in the history
…natures
  • Loading branch information
elerouxx authored and vpereverzev committed Jan 11, 2021
1 parent c0a7da4 commit e108098
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions libmscore/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2879,7 +2879,7 @@ bool Measure::isEmpty(int staffIdx) const
//---------------------------------------------------------
// isCutawayClef
/// Check for empty measure with only
/// a Courtesy Clef before the End Bar Line
/// a Courtesy Clef before End Bar Line
//---------------------------------------------------------

bool Measure::isCutawayClef(int staffIdx) const
Expand All @@ -2896,7 +2896,14 @@ bool Measure::isCutawayClef(int staffIdx) const
strack = staffIdx * VOICES;
etrack = strack + VOICES;
}
Segment* s = last()->prev();
// find segment before EndBarLine
Segment* s;
for (Segment* ls = last(); ls; ls = ls->prev()) {
if (ls->segmentType() == SegmentType::EndBarLine) {
s = ls->prev();
break;
}
}
if (!s)
return false;
for (int track = strack; track < etrack; ++track) {
Expand Down

0 comments on commit e108098

Please sign in to comment.