Skip to content

Commit

Permalink
Merge pull request musescore#18463 from mike-spa/fixCrossBeamForceHor…
Browse files Browse the repository at this point in the history
…izontal

Fix cross beam force horizontal bug
  • Loading branch information
RomanPudashkin committed Jul 7, 2023
2 parents fb0b72c + fb3583a commit 7e76cf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/engraving/layout/v0/beamtremololayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,12 @@ bool BeamTremoloLayout::calculateAnchorsCross()
minY = std::max(minY, chordBeamAnchorY(toChord(c)));
}
}

m_startAnchor.ry() = (maxY + minY) / 2;
m_endAnchor.ry() = (maxY + minY) / 2;
m_startAnchor.setX(chordBeamAnchorX(startCr, ChordBeamAnchorType::Start));
m_endAnchor.setX(chordBeamAnchorX(endCr, ChordBeamAnchorType::End));

m_slope = 0;

if (!noSlope()) {
Expand Down Expand Up @@ -825,8 +829,6 @@ bool BeamTremoloLayout::calculateAnchorsCross()
// nothing needs to be done, the beam is already horizontal and placed nicely
}
}
m_startAnchor.setX(chordBeamAnchorX(startCr, ChordBeamAnchorType::Start));
m_endAnchor.setX(chordBeamAnchorX(endCr, ChordBeamAnchorType::End));
m_slope = (m_endAnchor.y() - m_startAnchor.y()) / (m_endAnchor.x() - m_startAnchor.x());
}
return true;
Expand Down
Binary file added vtest/scores/cross-7.mscz
Binary file not shown.

0 comments on commit 7e76cf5

Please sign in to comment.