Skip to content

Commit

Permalink
Merge pull request #119 from DDMAL/clef-fix
Browse files Browse the repository at this point in the history
Fix removing clef error
  • Loading branch information
yinanazhou authored Dec 20, 2023
2 parents 0e4af70 + 459b293 commit 9970c87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/editortoolkit_neume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<Syllable *>(obj);
assert(syllable);
if (syllable->HasPrecedes() || syllable->HasFollows()) {
Expand Down

0 comments on commit 9970c87

Please sign in to comment.