From c07e5fa091ddb6c17d3285ca26b51076521bddb0 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Sat, 6 Jan 2024 22:39:40 +0100 Subject: [PATCH] allow fTrem in beam --- src/beam.cpp | 4 ++++ src/iomei.cpp | 3 +++ src/view_beam.cpp | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/src/beam.cpp b/src/beam.cpp index 335d7c536fb..775ccb9f55a 100644 --- a/src/beam.cpp +++ b/src/beam.cpp @@ -19,6 +19,7 @@ #include "btrem.h" #include "doc.h" #include "editorial.h" +#include "ftrem.h" #include "functor.h" #include "gracegrp.h" #include "layer.h" @@ -1634,6 +1635,9 @@ bool Beam::IsSupportedChild(Object *child) else if (child->Is(CLEF)) { assert(dynamic_cast(child)); } + else if (child->Is(FTREM)) { + assert(dynamic_cast(child)); + } else if (child->Is(GRACEGRP)) { assert(dynamic_cast(child)); } diff --git a/src/iomei.cpp b/src/iomei.cpp index 6ff5920f6c4..f349669a21e 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -3533,6 +3533,9 @@ bool MEIInput::IsAllowed(std::string element, Object *filterParent) else if (element == "clef") { return true; } + else if (element == "fTrem") { + return true; + } else if (element == "graceGrp") { return true; } diff --git a/src/view_beam.cpp b/src/view_beam.cpp index 1be6bdbe31c..4fbaf6582f0 100644 --- a/src/view_beam.cpp +++ b/src/view_beam.cpp @@ -49,6 +49,14 @@ void View::DrawBeam(DeviceContext *dc, LayerElement *element, Layer *layer, Staf return; } + if (beam->GetFirst(FTREM)) { + // If there is a fTrem we ignore the beam and just handle its children + dc->StartGraphic(element, "", element->GetID()); + this->DrawLayerChildren(dc, beam, layer, staff, measure); + dc->EndGraphic(element, this); + return; + } + beam->m_beamSegment.InitCoordRefs(beam->GetElementCoords()); data_BEAMPLACE initialPlace = beam->GetPlace();