Skip to content

Commit

Permalink
Fix cross staff slur glitches
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Aug 12, 2024
1 parent 9784899 commit 293b293
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/engraving/rendering/dev/pagelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,18 @@ void PageLayout::collectPage(LayoutContext& ctx)
continue;
}

long int stick = system->firstMeasure()->tick().ticks();
long int etick = system->endTick().ticks();
Fraction stick = system->firstMeasure()->tick();
Fraction etick = system->endTick();

IF_ASSERT_FAILED(stick < etick) {
continue;
}

auto spanners = ctx.dom().spannerMap().findOverlapping(stick, etick);
if (stick >= ctx.state().endTick() || etick <= ctx.state().startTick()) {
continue;
}

auto spanners = ctx.dom().spannerMap().findOverlapping(stick.ticks(), etick.ticks());
for (auto interval : spanners) {
Spanner* sp = interval.value;
if (!sp->isSlur() || sp->tick() == system->endTick()) {
Expand Down

0 comments on commit 293b293

Please sign in to comment.