Skip to content

Commit

Permalink
Merge pull request #3569 from rettinghaus/develop-beamchild
Browse files Browse the repository at this point in the history
allow fTrem in beam
  • Loading branch information
lpugin authored Jan 9, 2024
2 parents a3a767a + c07e5fa commit 9b86804
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -1634,6 +1635,9 @@ bool Beam::IsSupportedChild(Object *child)
else if (child->Is(CLEF)) {
assert(dynamic_cast<Clef *>(child));
}
else if (child->Is(FTREM)) {
assert(dynamic_cast<FTrem *>(child));
}
else if (child->Is(GRACEGRP)) {
assert(dynamic_cast<GraceGrp *>(child));
}
Expand Down
3 changes: 3 additions & 0 deletions src/iomei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 8 additions & 0 deletions src/view_beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 9b86804

Please sign in to comment.