From 76b4685b5f02e199c9605e3ac2ce6af375644f06 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Thu, 27 Aug 2015 22:34:45 +0300 Subject: [PATCH] Commented out a portion of code cosed a segfault --- src/Mod/PartDesign/Gui/Workbench.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Mod/PartDesign/Gui/Workbench.cpp b/src/Mod/PartDesign/Gui/Workbench.cpp index c50d8cbea..6a704825f 100644 --- a/src/Mod/PartDesign/Gui/Workbench.cpp +++ b/src/Mod/PartDesign/Gui/Workbench.cpp @@ -96,19 +96,19 @@ void Workbench::_switchToDocument(const App::Document* doc) Gui::Application::Instance->activeView()->setActiveObject(docPart, "Part"); //if (docPart->countObjectsOfType(PartDesign::Body::getClassTypeId()) < 1) // setUpPart(docPart); - - PartDesign::Body *tempBody = dynamic_cast (docPart->getObjectsOfType(PartDesign::Body::getClassTypeId()).front()); - if (tempBody) { - PartDesign::Body *viewBody = Gui::Application::Instance->activeView()->getActiveObject(PDBODYKEY); - activeBody = viewBody; - if (!viewBody) - activeBody = tempBody; - else if (!docPart->hasObject(viewBody)) - activeBody = tempBody; - - if (activeBody != viewBody) - Gui::Application::Instance->activeView()->setActiveObject(activeBody, PDBODYKEY); - } +// TODO Commented out for thurther remove or rewrite (2015-08-27, Fat-Zer) +// PartDesign::Body *tempBody = dynamic_cast (docPart->getObjectsOfType(PartDesign::Body::getClassTypeId()).front()); +// if (tempBody) { +// PartDesign::Body *viewBody = Gui::Application::Instance->activeView()->getActiveObject(PDBODYKEY); +// activeBody = viewBody; +// if (!viewBody) +// activeBody = tempBody; +// else if (!docPart->hasObject(viewBody)) +// activeBody = tempBody; +// +// if (activeBody != viewBody) +// Gui::Application::Instance->activeView()->setActiveObject(activeBody, PDBODYKEY); +// } } }