Skip to content

Commit

Permalink
fix #14146: Bars with text shouldn't be part of multi bar rests. Staf…
Browse files Browse the repository at this point in the history
…f and System texts break mmRest and are part of it like tempo text and rehearsal mark
  • Loading branch information
lasconic committed Feb 13, 2014
1 parent d1215a3 commit 73954df
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,9 @@ static bool validMMRestMeasure(Measure* m)
// return false;
for (Segment* s = m->first(); s; s = s->next()) {
for (Element* e : s->annotations()) {
if (e->type() != Element::REHEARSAL_MARK && e->type() != Element::TEMPO_TEXT)
if (e->type() != Element::REHEARSAL_MARK &&
e->type() != Element::TEMPO_TEXT &&
e->type() != Element::STAFF_TEXT)
return false;
}
}
Expand Down Expand Up @@ -977,7 +979,9 @@ static bool breakMultiMeasureRest(Measure* m)

for (Segment* s = m->first(); s; s = s->next()) {
for (Element* e : s->annotations()) {
if (e->type() == Element::REHEARSAL_MARK || e->type() == Element::TEMPO_TEXT)
if (e->type() == Element::REHEARSAL_MARK ||
e->type() == Element::TEMPO_TEXT ||
e->type() == Element::STAFF_TEXT)
return true;
}
}
Expand Down Expand Up @@ -1140,7 +1144,7 @@ void Score::createMMRests()
//
cs = m->findSegment(Segment::SegChordRest, m->tick());
for (Element* e : cs->annotations()) {
if (e->type() != Element::REHEARSAL_MARK && e->type() != Element::TEMPO_TEXT)
if (e->type() != Element::REHEARSAL_MARK && e->type() != Element::TEMPO_TEXT && e->type() != Element::STAFF_TEXT)
continue;

bool found = false;
Expand All @@ -1157,7 +1161,7 @@ void Score::createMMRests()
}
}
for (Element* e : s->annotations()) {
if (e->type() != Element::REHEARSAL_MARK && e->type() != Element::TEMPO_TEXT)
if (e->type() != Element::REHEARSAL_MARK && e->type() != Element::TEMPO_TEXT && e->type() != Element::STAFF_TEXT)
continue;
bool found = false;
for (Element* ee : cs->annotations()) {
Expand Down

0 comments on commit 73954df

Please sign in to comment.