From c06bd25e0b850c1233e33265b84816cb2edc5f22 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Wed, 15 Nov 2023 17:41:17 +0100 Subject: [PATCH] Place converted analytical ties in the starting measure. Fixes #2716 --- src/convertfunctor.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/convertfunctor.cpp b/src/convertfunctor.cpp index fd83e367bd3..3a77cfb6588 100644 --- a/src/convertfunctor.cpp +++ b/src/convertfunctor.cpp @@ -553,7 +553,14 @@ FunctorCode ConvertMarkupAnalyticalFunctor::VisitNote(Note *note) } tie->SetStartid("#" + (*iter)->GetID()); tie->SetEndid("#" + note->GetID()); - m_controlEvents.push_back(tie); + // Try to add it to the starting measure + Object *startMeasure = (*iter)->GetFirstAncestor(MEASURE); + if (startMeasure) { + startMeasure->AddChild(tie); + } + else { + m_controlEvents.push_back(tie); + } } else { LogWarning("Expected @tie median or terminal in note '%s', skipping it", note->GetID().c_str());