Skip to content

Commit

Permalink
Use beam's anchors instead of recalculating
Browse files Browse the repository at this point in the history
  • Loading branch information
miiizen committed Mar 10, 2025
1 parent 3a48e31 commit ebcd357
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/engraving/rendering/score/chordlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1275,10 +1275,8 @@ bool ChordLayout::isChordPosBelowBeam(Chord* item, Beam* beam)
Note* baseNote = item->up() ? item->downNote() : item->upNote();
double noteY = baseNote->pagePos().y();

ChordRest* startCR = beam->elements().front();
ChordRest* endCR = beam->elements().back();
PointF startAnchor = BeamLayout::chordBeamAnchor(beam, startCR, ChordBeamAnchorType::Start);
PointF endAnchor = BeamLayout::chordBeamAnchor(beam, endCR, ChordBeamAnchorType::End);
PointF startAnchor = beam->startAnchor();
PointF endAnchor = beam->endAnchor();

if (item == beam->elements().front()) {
return noteY > startAnchor.y();
Expand Down
Binary file added vtest/scores/beams-31.mscz
Binary file not shown.

0 comments on commit ebcd357

Please sign in to comment.