From c1931db1f42efc22d54b76e6a1f6618800cfb799 Mon Sep 17 00:00:00 2001 From: Michele Spagnolo Date: Wed, 28 Jun 2023 15:58:30 +0200 Subject: [PATCH] Don't compute stuff on staves that aren't shown --- src/engraving/layout/v0/measurelayout.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/engraving/layout/v0/measurelayout.cpp b/src/engraving/layout/v0/measurelayout.cpp index db6d1a190abfc..f61e438772bb5 100644 --- a/src/engraving/layout/v0/measurelayout.cpp +++ b/src/engraving/layout/v0/measurelayout.cpp @@ -806,6 +806,10 @@ void MeasureLayout::getNextMeasure(LayoutContext& ctx) // for (size_t staffIdx = 0; staffIdx < ctx.dom().nstaves(); ++staffIdx) { const Staff* staff = ctx.dom().staff(staffIdx); + if (!staff->show()) { + continue; + } + const Drumset* drumset = staff->part()->instrument(measure->tick())->useDrumset() ? staff->part()->instrument(measure->tick())->drumset() : 0; AccidentalState as; // list of already set accidentals for this measure @@ -912,6 +916,11 @@ void MeasureLayout::getNextMeasure(LayoutContext& ctx) } for (staff_idx_t staffIdx = 0; staffIdx < ctx.dom().nstaves(); ++staffIdx) { + const Staff* staff = ctx.dom().staff(staffIdx); + if (!staff->show()) { + continue; + } + for (Segment& segment : measure->segments()) { if (segment.isChordRestType()) { ChordLayout::layoutChords1(ctx, &segment, staffIdx);