Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow fTrem in beam #3569

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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