diff --git a/src/Mod/Part/App/PartFeature.cpp b/src/Mod/Part/App/PartFeature.cpp index e6be3036ef..60fad39631 100644 --- a/src/Mod/Part/App/PartFeature.cpp +++ b/src/Mod/Part/App/PartFeature.cpp @@ -484,10 +484,11 @@ static std::vector> getElementSource(App::Docu } } if (owner->isDerivedFrom(App::GeoFeature::getClassTypeId())) { - auto o = - static_cast(owner)->getElementOwner(ret.back().second); - if (o) - doc = o->getDocument(); + auto ownerGeoFeature = + static_cast(owner)->getElementOwner(ret.back().second); + if (ownerGeoFeature) { + doc = ownerGeoFeature->getDocument(); + } } obj = doc->getObjectByID(tag < 0 ? -tag : tag); if (type) { @@ -585,11 +586,12 @@ std::list Feature::getElementHistory(App::DocumentObject* fea break; } } - if(feature->isDerivedFrom(App::GeoFeature::getClassTypeId())) { - auto owner = - static_cast(feature)->getElementOwner(element); - if(owner) - doc = owner->getDocument(); + if (feature->isDerivedFrom(App::GeoFeature::getClassTypeId())) { + auto ownerGeoFeature = + static_cast(feature)->getElementOwner(element); + if (ownerGeoFeature) { + doc = ownerGeoFeature->getDocument(); + } } obj = doc->getObjectByID(std::abs(tag)); } diff --git a/src/Mod/PartDesign/App/Body.cpp b/src/Mod/PartDesign/App/Body.cpp index 4caf52d176..b9fd563da4 100644 --- a/src/Mod/PartDesign/App/Body.cpp +++ b/src/Mod/PartDesign/App/Body.cpp @@ -189,9 +189,6 @@ bool Body::isSolidFeature(const App::DocumentObject *obj) return false; } - // if (obj == BaseFeature.getValue()) - // return true; - if (obj->isDerivedFrom()) { if (PartDesign::Feature::isDatum(obj)) { // Datum objects are not solid diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index 41875a8dd5..b6a10acbc4 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -672,8 +672,11 @@ public: bool& yinv, eReasonList* rsn = nullptr) const; - DocumentObject *getSubObject(const char *subname, PyObject **pyObj=0, - Base::Matrix4D *mat=0, bool transform=true, int depth=0) const override; + DocumentObject* getSubObject(const char* subname, + PyObject** pyObj = 0, + Base::Matrix4D* mat = 0, + bool transform = true, + int depth = 0) const override; Part::TopoShape getEdge(const Part::Geometry* geo, const char* name) const;