Merge pull request #17697 from mikekirin/17696-mmrest-fix

MMRest recognition now skips annotations in the hidden staves
This commit is contained in:
mikekirin 2023-05-23 18:53:53 +02:00 committed by GitHub
commit 12bc39b721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -471,6 +471,9 @@ static bool validMMRestMeasure(const LayoutContext& ctx, Measure* m)
int n = 0;
for (Segment* s = m->first(); s; s = s->next()) {
for (EngravingItem* e : s->annotations()) {
if (!e->staff()->show()) {
continue;
}
if (!(e->isRehearsalMark() || e->isTempoText() || e->isHarmony() || e->isStaffText() || e->isSystemText() || e->isTripletFeel()
|| e->isPlayTechAnnotation() || e->isInstrumentChange())) {
return false;