From 069ea6a68e00aff77162d3461c033fa6f916d86b Mon Sep 17 00:00:00 2001 From: Bas Ruigrok Date: Wed, 28 Aug 2024 19:39:51 +0200 Subject: [PATCH] App: Return root object placement if target and root object are the same in getGlobalPlacement --- src/App/GeoFeature.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/App/GeoFeature.cpp b/src/App/GeoFeature.cpp index 383196629a..7db5db7a11 100644 --- a/src/App/GeoFeature.cpp +++ b/src/App/GeoFeature.cpp @@ -295,6 +295,8 @@ Base::Placement GeoFeature::getGlobalPlacement(App::DocumentObject* targetObj, App::Document* doc = rootObj->getDocument(); Base::Placement plc = getPlacementFromProp(rootObj, "Placement"); + if (targetObj == rootObj) return plc; + for (auto& name : names) { App::DocumentObject* obj = doc->getObject(name.c_str()); if (!obj) {