Skip to content

Commit

Permalink
Fix #19918: Tremolo beam disappearing
Browse files Browse the repository at this point in the history
  • Loading branch information
HemantAntony committed Nov 8, 2023
1 parent 5148846 commit 9ef8b6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/engraving/rendering/dev/tremololayout.cpp
Expand Up @@ -344,10 +344,11 @@ void TremoloLayout::createBeamSegments(Tremolo* item, LayoutContext& ctx)
double bboxTop = item->up()
? std::min(mainStroke->line.y1(), mainStroke->line.y2())
: std::max(mainStroke->line.y1(), mainStroke->line.y2());
double halfWidth = ctx.conf().styleMM(Sid::beamWidth).val() / 2. * (item->up() ? -1. : 1.);
double width = ctx.conf().styleMM(Sid::beamWidth).val();
double halfWidth = width / 2. * (item->up() ? -1. : 1.);

RectF bbox = RectF(mainStroke->line.x1(), bboxTop + halfWidth, mainStroke->line.x2() - mainStroke->line.x1(),
std::abs(mainStroke->line.y2() - mainStroke->line.y1()) - halfWidth * 2.);
std::abs(mainStroke->line.y2() - mainStroke->line.y1()) + width);

PointF beamOffset = PointF(0., (item->up() ? 1 : -1) * item->spatium() * (ctx.conf().styleB(Sid::useWideBeams) ? 1. : 0.75));
beamOffset.setY(beamOffset.y() * item->mag() * (_isGrace ? ctx.conf().styleD(Sid::graceNoteMag) : 1.));
Expand Down

0 comments on commit 9ef8b6e

Please sign in to comment.