diff --git a/src/engraving/rendering/score/horizontalspacing.cpp b/src/engraving/rendering/score/horizontalspacing.cpp index 69855c593004a..448ee1241e3b8 100644 --- a/src/engraving/rendering/score/horizontalspacing.cpp +++ b/src/engraving/rendering/score/horizontalspacing.cpp @@ -1038,7 +1038,12 @@ void HorizontalSpacing::setPositionsAndWidths(const std::vector Measure* curSegMeasure = curSeg->measure(); Measure* nextSegMeasure = nextSeg->measure(); - double segWidth = curSegMeasure == nextSegMeasure || nextSeg->isStartRepeatBarLineType() ? nextX - curX : curSeg->minRight(); + bool leadingNonCRException = ((nextSeg->isKeySigType() || nextSeg->isTimeSigType() + || nextSeg->isClefType()) && !curSeg->isType(SegmentType::BarLineType)); + bool computeWidthByDifferenceFromNext = curSegMeasure == nextSegMeasure || nextSeg->isStartRepeatBarLineType() + || leadingNonCRException; + + double segWidth = computeWidthByDifferenceFromNext ? nextX - curX : curSeg->minRight(); curSeg->setWidth(segWidth); diff --git a/vtest/scores/leadingNonChordSeg.mscz b/vtest/scores/leadingNonChordSeg.mscz new file mode 100644 index 0000000000000..b7bcad428873d Binary files /dev/null and b/vtest/scores/leadingNonChordSeg.mscz differ