Skip to content

Commit

Permalink
Merge pull request #111 from DDMAL/ungroup-bbox
Browse files Browse the repository at this point in the history
Fix ungroup when firstIsSyl
  • Loading branch information
yinanazhou authored Jul 28, 2023
2 parents 928682d + 7c1dc57 commit f761cd7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/editortoolkit_neume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2944,6 +2944,10 @@ bool EditorToolkitNeume::Ungroup(std::string groupType, std::vector<std::string>
// we'll still need to initialize all the parents, thus the bool
if (el->Is(SYL)) {
firstIsSyl = true;
oldSylZone = dynamic_cast<Zone *>(el->GetFacsimileInterface()->GetZone());
if (oldSylZone) {
oldSylZone->SetLrx(oldSylZone->GetUlx() + 100);
}
continue;
}
else if (groupType == "nc") {
Expand Down Expand Up @@ -2980,7 +2984,9 @@ bool EditorToolkitNeume::Ungroup(std::string groupType, std::vector<std::string>
}

// Get orginal syl zone
oldSylZone = dynamic_cast<Zone *>(currentParent->GetFirst(SYL)->GetFacsimileInterface()->GetZone());
if (!oldSylZone) {
oldSylZone = dynamic_cast<Zone *>(currentParent->GetFirst(SYL)->GetFacsimileInterface()->GetZone());
}
}

else {
Expand Down

0 comments on commit f761cd7

Please sign in to comment.