Bug fixes for Body feature insert/remove functionality

This commit is contained in:
jrheinlaender
2013-04-11 19:46:53 +04:30
committed by Stefan Tröger
parent 3e4986f163
commit ee47c53339
7 changed files with 79 additions and 13 deletions

View File

@@ -82,9 +82,11 @@ bool ViewProvider::onDelete(const std::vector<std::string> &)
// Make the new Tip and the previous solid feature visible again
App::DocumentObject* tip = body->Tip.getValue();
App::DocumentObject* prev = body->getPrevSolidFeature();
Gui::Application::Instance->getViewProvider(tip)->show();
if (tip != prev)
Gui::Application::Instance->getViewProvider(prev)->show();
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