From 34d358e7266e928ef24a1717e05148e4bc05ff50 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Thu, 4 Jan 2024 18:18:45 +0100 Subject: [PATCH] check fTrem attributes --- src/view_beam.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view_beam.cpp b/src/view_beam.cpp index 1be6bdbe31c..24bd8006935 100644 --- a/src/view_beam.cpp +++ b/src/view_beam.cpp @@ -150,8 +150,8 @@ void View::DrawFTremSegment(DeviceContext *dc, Staff *staff, FTrem *fTrem) secondElement->m_x += (m_doc->GetDrawingStemWidth(staff->m_drawingStaffSize)) / 2; } - // Number of bars to draw - const int allBars = fTrem->GetBeams(); + // Number of beams to draw + const int allBars = fTrem->HasBeams() ? fTrem->GetBeams() : fTrem->GetUnitdur() - DURATION_4; int floatingBars = fTrem->HasBeamsFloat() ? fTrem->GetBeamsFloat() : 0; int fullBars = allBars - floatingBars;