diff --git a/src/Mod/PartDesign/Gui/CommandBody.cpp b/src/Mod/PartDesign/Gui/CommandBody.cpp index 1125b9d76e..d6d753bccb 100644 --- a/src/Mod/PartDesign/Gui/CommandBody.cpp +++ b/src/Mod/PartDesign/Gui/CommandBody.cpp @@ -27,7 +27,6 @@ # include # include # include -# include # include #endif @@ -40,9 +39,7 @@ #include #include #include -#include #include -#include #include #include @@ -110,7 +107,6 @@ void CmdPartDesignBody::activated(int iMsg) std::vector features = getSelection().getObjectsOfType(Part::Feature::getClassTypeId()); App::DocumentObject* baseFeature = nullptr; - bool viewAll = features.empty(); bool addtogroup = false; @@ -297,28 +293,6 @@ void CmdPartDesignBody::activated(int iMsg) } } - // The method 'SoCamera::viewBoundingBox' is still declared as protected in Coin3d versions - // older than 4.0. -#if COIN_MAJOR_VERSION >= 4 - // if no part feature was there then auto-adjust the camera - if (viewAll) { - Gui::Document* doc = Gui::Application::Instance->getDocument(getDocument()); - Gui::View3DInventor* view = doc ? qobject_cast(doc->getActiveView()) : nullptr; - if (view) { - SoCamera* camera = view->getViewer()->getCamera(); - SbViewportRegion vpregion = view->getViewer()->getViewportRegion(); - float aspectratio = vpregion.getViewportAspectRatio(); - - float size = Gui::ViewProviderOrigin::defaultSize(); - SbBox3f bbox; - bbox.setBounds(-size,-size,-size,size,size,size); - camera->viewBoundingBox(bbox, aspectratio, 1.0f); - } - } -#else - Q_UNUSED(viewAll) -#endif - updateActive(); }