Skip to content

Commit

Permalink
Correct for different dynamic and expression offset when snapping
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Jul 10, 2023
1 parent e0481e2 commit 812aec7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/engraving/layout/v0/tlayout.cpp
Expand Up @@ -2693,8 +2693,10 @@ void TLayout::layout(HairpinSegment* item, LayoutContext& ctx)
}
if (ed->ipos().y() != ny) {
ed->setPosY(ny);
if (ed->snappedExpression()) {
ed->snappedExpression()->setPosY(ny);
Expression* snappedExpression = ed->snappedExpression();
if (snappedExpression) {
double yOffsetDiff = snappedExpression->offset().y() - ed->offset().y();
snappedExpression->setPosY(ny - yOffsetDiff);
}
if (ed->addToSkyline()) {
Segment* s = ed->segment();
Expand Down

0 comments on commit 812aec7

Please sign in to comment.