Skip to content

Commit

Permalink
fix #27781: wrong articulation position on stemless notes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Jul 22, 2014
1 parent 6bde76a commit 95f5cb5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libmscore/chord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,11 @@ QPointF Chord::layoutArticulation(Articulation* a)
QPointF pos; // computed articulation position
if (stem()) // if there is a stem, assume artic. will be beyond the stem
pos = stem()->hookPos();

else { // otherwise, compute horizontal position as if there were a stem
pos.rx() = stemPosX();
if (!_up)
pos.rx() += point(score()->styleS(StyleIdx::stemWidth));
}
a->layout();

qreal _spatium2 = _spatium * .5;
Expand Down
4 changes: 4 additions & 0 deletions libmscore/slur.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,8 @@ void Slur::slurPos(SlurPos* sp)
yo = fixArticulations(yo, sc, __up);
}
}
else if (sc->up() != _up)
yo = fixArticulations(yo, sc, __up);

if (sa1 == SlurAnchor::NONE)
sp->p1 += QPointF(xo, yo);
Expand Down Expand Up @@ -960,6 +962,8 @@ void Slur::slurPos(SlurPos* sp)
else if (ec->up() != _up)
yo = fixArticulations(yo, ec, __up);
}
else if (ec->up() != _up)
yo = fixArticulations(yo, ec, __up);

if (sa2 == SlurAnchor::NONE)
sp->p2 += QPointF(xo, yo);
Expand Down
Binary file modified vtest/slurs-1-ref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vtest/slurs-1.mscz
Binary file not shown.

0 comments on commit 95f5cb5

Please sign in to comment.