Skip to content

Commit 311f614

Browse files
committed
show system elements when first staff is hidden
1 parent 9d79fb7 commit 311f614

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

libmscore/measure.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@ void Measure::scanElements(void* data, void (*func)(void*, Element*), bool all)
24262426
e->scanElements(data, func, all);
24272427
}
24282428
foreach(Element* e, s->annotations()) {
2429-
if (all || visible(e->staffIdx()))
2429+
if (all || e->systemFlag() || visible(e->staffIdx()))
24302430
e->scanElements(data, func, all);
24312431
}
24322432
}

libmscore/system.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,8 @@ void System::layout2()
350350
if (firstStaffIdx == -1)
351351
firstStaffIdx = staffIdx;
352352
}
353+
if (firstStaffIdx == -1)
354+
firstStaffIdx = 0;
353355

354356
qreal systemHeight = staff(lastStaffIdx)->bbox().bottom();
355357
setHeight(systemHeight);

mscore/seq.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,10 @@ void Seq::putEvent(const Event& event)
12501250
if (!cs)
12511251
return;
12521252
int channel = event.channel();
1253+
if (channel >= cs->midiMapping()->size()) {
1254+
qDebug("bad channel value");
1255+
return;
1256+
}
12531257
int syntiIdx= cs->midiMapping(channel)->articulation->synti;
12541258
synti->play(event, syntiIdx);
12551259
}

0 commit comments

Comments
 (0)