From 041a4afe87073e76aaf65c4f7731b7dcae116bd7 Mon Sep 17 00:00:00 2001 From: MarcSabatella Date: Mon, 17 Dec 2018 16:27:35 -0700 Subject: [PATCH] fix #280208: hairpin should not normally cross barline to meet note --- libmscore/hairpin.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libmscore/hairpin.cpp b/libmscore/hairpin.cpp index 5cd5bf4c687b..e63c99b45825 100644 --- a/libmscore/hairpin.cpp +++ b/libmscore/hairpin.cpp @@ -112,9 +112,8 @@ void HairpinSegment::layout() const qreal edLeft = ed->bbox().left() + ed->pos().x() + ed->segment()->pos().x() + ed->measure()->pos().x(); const qreal dist = edLeft - pos2().x() - pos().x() - score()->styleP(Sid::autoplaceHairpinDynamicsDistance); - rxpos2() += dist; - // TODO - don't extend hairpin across barline to reach dynamic in next measure? - // or only if there is also a key signature? see Gould + if (dist < 0.0 || dist >= 3.0 * spatium()) + rxpos2() += dist; } } }