Merge pull request #4682 from lyrra/fix_282184

fix #282184 dont layout invisible slurs
This commit is contained in:
Dmitri Ovodok 2019-04-22 15:34:33 +03:00 committed by GitHub
commit 2b9b8d0f17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -3205,17 +3205,20 @@ void Score::layoutLyrics(System* system)
void layoutTies(Chord* ch, System* system, const Fraction& stick)
{
SysStaff* staff = system->staff(ch->staffIdx());
if (!staff->show())
return;
for (Note* note : ch->notes()) {
Tie* t = note->tieFor();
if (t) {
TieSegment* ts = t->layoutFor(system);
system->staff(ch->staffIdx())->skyline().add(ts->shape().translated(ts->pos()));
staff->skyline().add(ts->shape().translated(ts->pos()));
}
t = note->tieBack();
if (t) {
if (t->startNote()->tick() < stick) {
TieSegment* ts = t->layoutBack(system);
system->staff(ch->staffIdx())->skyline().add(ts->shape().translated(ts->pos()));
staff->skyline().add(ts->shape().translated(ts->pos()));
}
}
}

View file

@ -488,7 +488,7 @@ void Tie::slurPos(SlurPos* sp)
}
Chord* ec = endNote()->chord();
sp->p2 = ec->pos() + ec->segment()->pos() + ec->measure()->pos();
if ((sc->measure() == sp->system1->lastMeasure()) && (ec->measure() != sc->measure()))
if (sp->system1 && (sc->measure() == sp->system1->lastMeasure()) && (ec->measure() != sc->measure()))
sp->system2 = nullptr;
else
sp->system2 = ec->measure()->system();