[PD] Fixed loft and sweep breaking on section deletion

Item removal in `onDeleteSection()` was also clearing subname details so if one
of the remaining sections was a face this caused a failure.
This commit is contained in:
Ajinkya Dahale
2021-11-08 21:20:16 -05:00
committed by Uwe
parent 03a8ff7841
commit 314ff0053c
2 changed files with 10 additions and 4 deletions

View File

@@ -1042,6 +1042,8 @@ bool TaskPipeScaling::referenceSelected(const SelectionChanges& msg) const {
}
else {
if (f != refs.end())
// Removing just the object this way instead of `refs.erase` and
// `setValues(ref)` cleanly ensures subnames are preserved.
pipe->Sections.removeValue(obj);
else
return false;
@@ -1082,8 +1084,9 @@ void TaskPipeScaling::onDeleteSection()
// if something was found, delete it and update the section list
if (f != refs.end()) {
refs.erase(f);
pipe->Sections.setValues(refs);
// Removing just the object this way instead of `refs.erase` and
// `setValues(ref)` cleanly ensures subnames are preserved.
pipe->Sections.removeValue(obj);
clearButtons();
recomputeFeature();
}