From 3db5a20be09fdeac97223c80ba666d35438b4f55 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Mon, 2 Dec 2024 19:08:21 +0100 Subject: [PATCH] Fix ledger line regression. Fixes #3872 * Test-suite evaluated locally --- src/staff.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/staff.cpp b/src/staff.cpp index eee4fc0a3e..26de629c67 100644 --- a/src/staff.cpp +++ b/src/staff.cpp @@ -318,9 +318,8 @@ void LedgerLine::AddDash(int left, int right, int extension, const Object *event iter = m_dashes.begin(); ++iter; while (iter != m_dashes.end()) { - if (previous->m_x1 > iter->m_x1 + 1.5 * extension) { + if (previous->m_x2 > iter->m_x1 + 1.5 * extension) { previous->MergeWith(*iter); - previous->m_x2 = std::max(iter->m_x2, previous->m_x2); iter = m_dashes.erase(iter); } else {