Skip to content

Commit 0759bc9

Browse files
Merge pull request #18464 from mike-spa/port#18460
Port #18463: Fix cross beam force horizontal
2 parents aa456a3 + bc1b2d1 commit 0759bc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/engraving/layout/v0/beamtremololayout.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,12 @@ bool BeamTremoloLayout::calculateAnchorsCross()
720720
minY = std::max(minY, chordBeamAnchorY(toChord(c)));
721721
}
722722
}
723+
723724
m_startAnchor.ry() = (maxY + minY) / 2;
724725
m_endAnchor.ry() = (maxY + minY) / 2;
726+
m_startAnchor.setX(chordBeamAnchorX(startCr, ChordBeamAnchorType::Start));
727+
m_endAnchor.setX(chordBeamAnchorX(endCr, ChordBeamAnchorType::End));
728+
725729
m_slope = 0;
726730

727731
if (!noSlope()) {
@@ -825,8 +829,6 @@ bool BeamTremoloLayout::calculateAnchorsCross()
825829
// nothing needs to be done, the beam is already horizontal and placed nicely
826830
}
827831
}
828-
m_startAnchor.setX(chordBeamAnchorX(startCr, ChordBeamAnchorType::Start));
829-
m_endAnchor.setX(chordBeamAnchorX(endCr, ChordBeamAnchorType::End));
830832
m_slope = (m_endAnchor.y() - m_startAnchor.y()) / (m_endAnchor.x() - m_startAnchor.x());
831833
}
832834
return true;

0 commit comments

Comments
 (0)