From 31119b92285c39ae3fea42887d5886e4a9ebc161 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 5 Jul 2024 15:03:08 +0200 Subject: [PATCH 1/3] Align clef in neume notation --- include/vrv/adjustxposfunctor.h | 2 ++ src/adjustxposfunctor.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/vrv/adjustxposfunctor.h b/include/vrv/adjustxposfunctor.h index 641bda82629..ffdb5380762 100644 --- a/include/vrv/adjustxposfunctor.h +++ b/include/vrv/adjustxposfunctor.h @@ -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 m_staffNs; // The bounding boxes in the previous aligner diff --git a/src/adjustxposfunctor.cpp b/src/adjustxposfunctor.cpp index 88b0cf1a031..c901a84a27c 100644 --- a/src/adjustxposfunctor.cpp +++ b/src/adjustxposfunctor.cpp @@ -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; } @@ -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) { From 4075b2526723e06e2c5aa13cff69d8f1347f5ed1 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 5 Jul 2024 15:04:25 +0200 Subject: [PATCH 2/3] Comment log debug --- src/alignfunctor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alignfunctor.cpp b/src/alignfunctor.cpp index 476bf07f10e..5c2d24bc4f3 100644 --- a/src/alignfunctor.cpp +++ b/src/alignfunctor.cpp @@ -394,7 +394,7 @@ FunctorCode AlignHorizontallyFunctor::VisitMeasureEnd(Measure *measure) if (m_hasMultipleLayer) measure->HasAlignmentRefWithMultipleLayers(true); - measure->m_measureAligner.LogDebugTree(3); + //measure->m_measureAligner.LogDebugTree(3); return FUNCTOR_CONTINUE; } From 84d996780a32d12db7ce15d970f0aedfce388160 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Fri, 5 Jul 2024 15:07:28 +0200 Subject: [PATCH 3/3] Fix formatting --- src/alignfunctor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alignfunctor.cpp b/src/alignfunctor.cpp index 5c2d24bc4f3..517f3ccf135 100644 --- a/src/alignfunctor.cpp +++ b/src/alignfunctor.cpp @@ -394,7 +394,7 @@ FunctorCode AlignHorizontallyFunctor::VisitMeasureEnd(Measure *measure) if (m_hasMultipleLayer) measure->HasAlignmentRefWithMultipleLayers(true); - //measure->m_measureAligner.LogDebugTree(3); + // measure->m_measureAligner.LogDebugTree(3); return FUNCTOR_CONTINUE; }