More bug fixes for Body insertion/deletion of features

This commit is contained in:
jrheinlaender
2013-04-12 16:16:34 +04:30
committed by Stefan Tröger
parent ee47c53339
commit 63f782d8f0
9 changed files with 125 additions and 98 deletions

View File

@@ -553,20 +553,7 @@ bool TaskDlgPadParameters::reject()
Sketcher::SketchObject *pcSketch = 0;
if (pcPad->Sketch.getValue()) {
pcSketch = static_cast<Sketcher::SketchObject*>(pcPad->Sketch.getValue());
}
// Body housekeeping
if (ActivePartObject != NULL) {
ActivePartObject->removeFeature(pcPad);
// Make the new Tip and the previous solid feature visible again
App::DocumentObject* tip = ActivePartObject->Tip.getValue();
App::DocumentObject* prev = ActivePartObject->getPrevSolidFeature();
if (tip != NULL) {
Gui::Application::Instance->getViewProvider(tip)->show();
if ((tip != prev) && (prev != NULL))
Gui::Application::Instance->getViewProvider(prev)->show();
}
}
}
// roll back the done things
Gui::Command::abortCommand();
@@ -578,6 +565,18 @@ bool TaskDlgPadParameters::reject()
Gui::Application::Instance->getViewProvider(pcSketch)->show();
}
// Body housekeeping
if (ActivePartObject != NULL) {
// Make the new Tip and the previous solid feature visible again
App::DocumentObject* tip = ActivePartObject->Tip.getValue();
App::DocumentObject* prev = ActivePartObject->getPrevSolidFeature();
if (tip != NULL) {
Gui::Application::Instance->getViewProvider(tip)->show();
if ((tip != prev) && (prev != NULL))
Gui::Application::Instance->getViewProvider(prev)->show();
}
}
return true;
}