fix #286948: horizontal tie normally
This commit is contained in:
parent
a9d043ae3f
commit
8fbd3e04d3
2 changed files with 13 additions and 11 deletions
|
@ -658,16 +658,12 @@ void Measure::layout2()
|
||||||
Chord* c = toChord(cr);
|
Chord* c = toChord(cr);
|
||||||
for (const Note* note : c->notes()) {
|
for (const Note* note : c->notes()) {
|
||||||
Tie* t = note->tieFor();
|
Tie* t = note->tieFor();
|
||||||
if (t) {
|
if (t)
|
||||||
TieSegment* ts = t->layoutFor(system());
|
t->layoutFor(system());
|
||||||
//system->staff(ch->staffIdx())->skyline().add(ts->shape().translated(ts->pos()));
|
|
||||||
}
|
|
||||||
t = note->tieBack();
|
t = note->tieBack();
|
||||||
if (t) {
|
if (t) {
|
||||||
if (t->startNote()->tick() < stick) {
|
if (t->startNote()->tick() < stick)
|
||||||
TieSegment* ts = t->layoutBack(system());
|
t->layoutBack(system());
|
||||||
//system->staff(ch->staffIdx())->skyline().add(ts->shape().translated(ts->pos()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (Spanner* sp : note->spannerFor())
|
for (Spanner* sp : note->spannerFor())
|
||||||
sp->layout();
|
sp->layout();
|
||||||
|
|
|
@ -490,18 +490,24 @@ void Tie::slurPos(SlurPos* sp)
|
||||||
else
|
else
|
||||||
sp->system2 = ec->measure()->system();
|
sp->system2 = ec->measure()->system();
|
||||||
|
|
||||||
|
// force tie to be horizontal except for cross-staff or if there is a difference of enharmonic spelling
|
||||||
|
bool horizontal = startNote()->tpc() == endNote()->tpc() && sc->vStaffIdx() == ec->vStaffIdx();
|
||||||
|
|
||||||
hw = endNote()->tabHeadWidth(stt);
|
hw = endNote()->tabHeadWidth(stt);
|
||||||
if ((ec->notes().size() > 1) || (ec->stem() && !ec->up() && !_up)) {
|
if ((ec->notes().size() > 1) || (ec->stem() && !ec->up() && !_up)) {
|
||||||
xo = endNote()->x() - hw * 0.12;
|
xo = endNote()->x() - hw * 0.12;
|
||||||
yo = endNote()->pos().y() + yOffInside;
|
if (!horizontal)
|
||||||
|
yo = endNote()->pos().y() + yOffInside;
|
||||||
}
|
}
|
||||||
else if (shortStart) {
|
else if (shortStart) {
|
||||||
xo = endNote()->x() + hw * 0.15;
|
xo = endNote()->x() + hw * 0.15;
|
||||||
yo = endNote()->pos().y() + yOffOutside;
|
if (!horizontal)
|
||||||
|
yo = endNote()->pos().y() + yOffOutside;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xo = endNote()->x() + hw * 0.35;
|
xo = endNote()->x() + hw * 0.35;
|
||||||
yo = endNote()->pos().y() + yOffOutside;
|
if (!horizontal)
|
||||||
|
yo = endNote()->pos().y() + yOffOutside;
|
||||||
}
|
}
|
||||||
sp->p2 += QPointF(xo, yo);
|
sp->p2 += QPointF(xo, yo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue