Skip to content

Commit

Permalink
Merge pull request #18464 from mike-spa/port#18460
Browse files Browse the repository at this point in the history
Port #18463: Fix cross beam force horizontal
  • Loading branch information
RomanPudashkin committed Jul 7, 2023
2 parents aa456a3 + bc1b2d1 commit 0759bc9
Showing 1 changed file 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

0 comments on commit 0759bc9

Please sign in to comment.