Commented out a portion of code cosed a segfault
This commit is contained in:
parent
5016054a8b
commit
76b4685b5f
|
@ -96,19 +96,19 @@ void Workbench::_switchToDocument(const App::Document* doc)
|
||||||
Gui::Application::Instance->activeView()->setActiveObject(docPart, "Part");
|
Gui::Application::Instance->activeView()->setActiveObject(docPart, "Part");
|
||||||
//if (docPart->countObjectsOfType(PartDesign::Body::getClassTypeId()) < 1)
|
//if (docPart->countObjectsOfType(PartDesign::Body::getClassTypeId()) < 1)
|
||||||
// setUpPart(docPart);
|
// setUpPart(docPart);
|
||||||
|
// TODO Commented out for thurther remove or rewrite (2015-08-27, Fat-Zer)
|
||||||
PartDesign::Body *tempBody = dynamic_cast<PartDesign::Body *> (docPart->getObjectsOfType(PartDesign::Body::getClassTypeId()).front());
|
// PartDesign::Body *tempBody = dynamic_cast<PartDesign::Body *> (docPart->getObjectsOfType(PartDesign::Body::getClassTypeId()).front());
|
||||||
if (tempBody) {
|
// if (tempBody) {
|
||||||
PartDesign::Body *viewBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>(PDBODYKEY);
|
// PartDesign::Body *viewBody = Gui::Application::Instance->activeView()->getActiveObject<PartDesign::Body*>(PDBODYKEY);
|
||||||
activeBody = viewBody;
|
// activeBody = viewBody;
|
||||||
if (!viewBody)
|
// if (!viewBody)
|
||||||
activeBody = tempBody;
|
// activeBody = tempBody;
|
||||||
else if (!docPart->hasObject(viewBody))
|
// else if (!docPart->hasObject(viewBody))
|
||||||
activeBody = tempBody;
|
// activeBody = tempBody;
|
||||||
|
//
|
||||||
if (activeBody != viewBody)
|
// if (activeBody != viewBody)
|
||||||
Gui::Application::Instance->activeView()->setActiveObject(activeBody, PDBODYKEY);
|
// Gui::Application::Instance->activeView()->setActiveObject(activeBody, PDBODYKEY);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user