Skip to content

Commit

Permalink
fix #20456: Measure number not displayed if top staff is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed May 1, 2013
1 parent 2e40e6d commit f6de8f2
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions libmscore/measure.cpp
Expand Up @@ -612,9 +612,24 @@ void Measure::layout2()
QString s;
if (smn)
s = QString("%1").arg(_no + 1);

int nn = (score()->styleB(ST_measureNumberAllStaffs)) ? n : 1;
for (int staffIdx = 0; staffIdx < nn; ++staffIdx) {
int sn = 0;
int nn = 1;
if (score()->styleB(ST_measureNumberAllStaffs))
nn = n;
else {
//find first non invisible staff
for (int staffIdx = 0; staffIdx < n; ++staffIdx) {
MStaff* ms = staves.at(staffIdx);
SysStaff* s = system()->staff(staffIdx);
Staff* staff = score()->staff(staffIdx);
if (ms->visible() && staff->show() && s->show()) {
sn = staffIdx;
nn = staffIdx + 1;
break;
}
}
}
for (int staffIdx = sn; staffIdx < nn; ++staffIdx) {
MStaff* ms = staves.at(staffIdx);
Text* t = ms->noText();
if (smn) {
Expand Down

0 comments on commit f6de8f2

Please sign in to comment.