Moved some methods from PartDesign::Body to Part::BodyBase so the SketchObjects will be removed cleanly from the Body when deleted
This commit is contained in:
committed by
Stefan Tröger
parent
5b3d5e6bd8
commit
02dfb8551d
@@ -72,27 +72,3 @@ void ViewProvider::updateData(const App::Property* prop)
|
||||
}
|
||||
inherited::updateData(prop);
|
||||
}
|
||||
|
||||
bool ViewProvider::onDelete(const std::vector<std::string> &)
|
||||
{
|
||||
// Body feature housekeeping
|
||||
PartDesign::Body* body = PartDesign::Body::findBodyOf(getObject());
|
||||
if (body != NULL) {
|
||||
body->removeFeature(getObject());
|
||||
// Make the new Tip and the previous solid feature visible again
|
||||
App::DocumentObject* tip = body->Tip.getValue();
|
||||
App::DocumentObject* prev = body->getPrevSolidFeature();
|
||||
if (tip != NULL) {
|
||||
Gui::Application::Instance->getViewProvider(tip)->show();
|
||||
if ((tip != prev) && (prev != NULL))
|
||||
Gui::Application::Instance->getViewProvider(prev)->show();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Ask user what to do about dependent objects, e.g. Sketches that have this feature as their support
|
||||
// 1. Delete
|
||||
// 2. Suppress
|
||||
// 3. Re-route
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user