PartDesign: Unify deletion behavior

This unifies deletion behavior for all PartDesign features ensuring that
sketches that were used to create these features show after deletion and
that the tip is properly transfered.
This commit is contained in:
Kacper Donat
2025-08-14 16:14:02 +02:00
committed by Chris Hennes
parent be3b9edd33
commit cf951bae6b
12 changed files with 12 additions and 92 deletions

View File

@@ -249,6 +249,15 @@ void ViewProvider::updatePreview()
}
}
void ViewProvider::makeChildrenVisible()
{
for (const auto child : claimChildren()) {
if (auto vp = Gui::Application::Instance->getViewProvider(child)) {
vp->show();
}
}
}
void ViewProvider::onChanged(const App::Property* prop) {
//if the object is inside of a body we make sure it is the only visible one on activation
@@ -340,6 +349,8 @@ bool ViewProvider::onDelete(const std::vector<std::string>&)
FCMD_OBJ_CMD(body, "removeObject(" << Gui::Command::getObjectCmd(feature) << ')');
}
makeChildrenVisible();
return true;
}