From 6fb5fdf60e1153fdf8ee3ef1d0dee8a192197ca8 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Sat, 30 Sep 2023 19:10:04 +0200 Subject: [PATCH] Fix position of mensural dots at the end of a system Fixes #3524 --- include/vrv/preparedatafunctor.h | 3 ++- src/preparedatafunctor.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/vrv/preparedatafunctor.h b/include/vrv/preparedatafunctor.h index 99803f51d6a..412ef9f3918 100644 --- a/include/vrv/preparedatafunctor.h +++ b/include/vrv/preparedatafunctor.h @@ -620,7 +620,7 @@ class PreparePointersByLayerFunctor : public Functor { /* * Abstract base implementation */ - bool ImplementsEndInterface() const override { return false; } + bool ImplementsEndInterface() const override { return true; } /* * Functor interface @@ -628,6 +628,7 @@ class PreparePointersByLayerFunctor : public Functor { ///@{ FunctorCode VisitDot(Dot *dot) override; FunctorCode VisitLayerElement(LayerElement *layerElement) override; + FunctorCode VisitMeasureEnd(Measure *measure) override; ///@} protected: diff --git a/src/preparedatafunctor.cpp b/src/preparedatafunctor.cpp index 7b5f19b594b..74e18ae3f57 100644 --- a/src/preparedatafunctor.cpp +++ b/src/preparedatafunctor.cpp @@ -960,6 +960,16 @@ FunctorCode PreparePointersByLayerFunctor::VisitLayerElement(LayerElement *layer return FUNCTOR_CONTINUE; } +FunctorCode PreparePointersByLayerFunctor::VisitMeasureEnd(Measure *measure) +{ + if (m_lastDot) { + m_lastDot->m_drawingNextElement = measure->GetRightBarLine(); + m_lastDot = NULL; + } + + return FUNCTOR_CONTINUE; +} + //---------------------------------------------------------------------------- // PrepareLyricsFunctor //----------------------------------------------------------------------------