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()) {