From bbfc7861b510a65e31644c4d8237973ab24cd207 Mon Sep 17 00:00:00 2001 From: XiaoMigros Date: Tue, 18 Nov 2025 09:56:22 +0100 Subject: [PATCH] Don't snap hairpins to non-autoplace elements --- src/engraving/dom/hairpin.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/engraving/dom/hairpin.cpp b/src/engraving/dom/hairpin.cpp index fe7f751dee309..c5464df47fc63 100644 --- a/src/engraving/dom/hairpin.cpp +++ b/src/engraving/dom/hairpin.cpp @@ -309,7 +309,8 @@ EngravingItem* HairpinSegment::findElementToSnapBefore(bool ignoreInvisible) con auto intervals = score()->spannerMap().findOverlapping(startTick.ticks(), startTick.ticks()); for (auto interval : intervals) { Spanner* spanner = interval.value; - bool isValidHairpin = spanner->isHairpin() && !spanner->segmentsEmpty() && spanner->visible() && spanner != thisHairpin; + bool isValidHairpin = spanner->isHairpin() && !spanner->segmentsEmpty() && spanner != thisHairpin + && (spanner->addToSkyline() || !ignoreInvisible); if (!isValidHairpin) { continue; } @@ -366,7 +367,7 @@ TextBase* HairpinSegment::findStartDynamicOrExpression(bool ignoreInvisible) con if (!item->isDynamic() && !item->isExpression()) { continue; } - if (ignoreInvisible && !item->visible()) { + if (ignoreInvisible && !item->addToSkyline()) { continue; } bool endsMatch = item->track() == hairpin()->track() @@ -420,7 +421,7 @@ TextBase* HairpinSegment::findEndDynamicOrExpression(bool ignoreInvisible) const if (!item->isDynamic() && !item->isExpression()) { continue; } - if (ignoreInvisible && !item->visible()) { + if (ignoreInvisible && !item->addToSkyline()) { continue; } bool endsMatch = item->track() == hairpin()->track()