Prevent unnecessary error messages while loading a part

This commit is contained in:
jrheinlaender
2013-07-07 11:31:14 +02:00
committed by Stefan Tröger
parent 1e615043cd
commit 2d080dd92b
5 changed files with 18 additions and 8 deletions

View File

@@ -350,10 +350,12 @@ bool TaskDlgBooleanParameters::reject()
PartDesign::Boolean* obj = static_cast<PartDesign::Boolean*>(BooleanView->getObject());
Gui::Document* doc = Gui::Application::Instance->activeDocument();
if (doc != NULL) {
doc->setShow(obj->BaseFeature.getValue()->getNameInDocument());
std::vector<App::DocumentObject*> bodies = obj->Bodies.getValues();
for (std::vector<App::DocumentObject*>::const_iterator b = bodies.begin(); b != bodies.end(); b++)
doc->setShow((*b)->getNameInDocument());
if (obj->BaseFeature.getValue() != NULL) {
doc->setShow(obj->BaseFeature.getValue()->getNameInDocument());
std::vector<App::DocumentObject*> bodies = obj->Bodies.getValues();
for (std::vector<App::DocumentObject*>::const_iterator b = bodies.begin(); b != bodies.end(); b++)
doc->setShow((*b)->getNameInDocument());
}
}
// roll back the done things