Skip to content

Commit

Permalink
fix #279062: re-implement instrument option for hide when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Dec 7, 2018
1 parent 55e0dea commit 30dbe42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libmscore/layout.cpp
Expand Up @@ -1254,10 +1254,14 @@ void Score::hideEmptyStaves(System* system, bool isFirstSystem)
for (int i = 0; i < part->nstaves(); ++i) {
int st = idx + i;

foreach (MeasureBase* mb, system->measures()) {
for (MeasureBase* mb : system->measures()) {
if (!mb->isMeasure())
continue;
Measure* m = toMeasure(mb);
if (staff->hideWhenEmpty() == Staff::HideMode::INSTRUMENT && !m->isMeasureRest(st)) {
hideStaff = false;
break;
}
for (Segment* s = m->first(SegmentType::ChordRest); s; s = s->next(SegmentType::ChordRest)) {
for (int voice = 0; voice < VOICES; ++voice) {
ChordRest* cr = s->cr(st * VOICES + voice);
Expand Down

0 comments on commit 30dbe42

Please sign in to comment.