App: Return root object placement if target and root object are the same in getGlobalPlacement

This commit is contained in:
Bas Ruigrok
2024-08-28 19:39:51 +02:00
parent 2123e53d42
commit 069ea6a68e

View File

@@ -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) {