Skip to content

Commit

Permalink
Align clef in neume notation
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Jul 5, 2024
1 parent 8d1abce commit 31119b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions include/vrv/adjustxposfunctor.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class AdjustXPosFunctor : public DocFunctor {
int m_staffN;
// The current staff size
int m_staffSize;
// The current staff is neume
bool m_isNeumeStaff;
// The list of staffN in the top-level scoreDef
std::vector<int> m_staffNs;
// The bounding boxes in the previous aligner
Expand Down
3 changes: 2 additions & 1 deletion src/adjustxposfunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ FunctorCode AdjustXPosFunctor::VisitLayerElement(LayerElement *layerElement)
return FUNCTOR_SIBLINGS;
}

if (layerElement->GetAlignment()->GetType() == ALIGNMENT_CLEF) {
if ((layerElement->GetAlignment()->GetType() == ALIGNMENT_CLEF) && !m_isNeumeStaff) {
return FUNCTOR_CONTINUE;
}

Expand Down Expand Up @@ -232,6 +232,7 @@ FunctorCode AdjustXPosFunctor::VisitMeasure(Measure *measure)
m_currentAlignment.Reset();
StaffAlignment *staffAlignment = system->m_systemAligner.GetStaffAlignmentForStaffN(staffN);
m_staffSize = (staffAlignment) ? staffAlignment->GetStaffSize() : 100;
m_isNeumeStaff = (staffAlignment && staffAlignment->GetStaff()) ? staffAlignment->GetStaff()->IsNeume() : false;

// Prevent collisions of scoredef clefs with thick barlines
if (hasSystemStartLine) {
Expand Down

0 comments on commit 31119b9

Please sign in to comment.