From 459b29399672c425e5257bec053e32d4badcf601 Mon Sep 17 00:00:00 2001 From: Yinan Zhou Date: Tue, 19 Dec 2023 16:37:58 -0500 Subject: [PATCH] Fix removing clef error --- src/editortoolkit_neume.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/editortoolkit_neume.cpp b/src/editortoolkit_neume.cpp index bb0756c02cf..e793f336fdf 100644 --- a/src/editortoolkit_neume.cpp +++ b/src/editortoolkit_neume.cpp @@ -2146,10 +2146,11 @@ bool EditorToolkitNeume::Remove(std::string elementId) Object *obj = m_doc->GetDrawingPage()->FindDescendantByID(elementId); assert(obj); bool result = false; - bool isNeumeOrNc, isNc, isClef; + bool isNeumeOrNc, isNc, isClef, isSyllable; isNeumeOrNc = (obj->Is(NC) || obj->Is(NEUME)); isNc = obj->Is(NC); isClef = obj->Is(CLEF); + isSyllable = obj->Is(SYLLABLE); Object *parent = obj->GetParent(); assert(parent); m_editInfo.import("uuid", elementId); @@ -2206,8 +2207,7 @@ bool EditorToolkitNeume::Remove(std::string elementId) pi->AdjustPitchForNewClef(clef, previousClef); } } - - if (obj->Is(SYLLABLE)) { + else if (isSyllable) { Syllable *syllable = dynamic_cast(obj); assert(syllable); if (syllable->HasPrecedes() || syllable->HasFollows()) {