App: Prevent addObjects from extracting children of nested groups (#26846)

* App: Prevent from extracting children of nested groups

Signed-off-by: Yash Suthar <[email protected]>

* Update src/App/GeoFeatureGroupExtension.cpp

---------

Signed-off-by: Yash Suthar <[email protected]>
Co-authored-by: Kacper Donat <[email protected]>
(cherry picked from commit 7aafb105f7)
This commit is contained in:
Yash Suthar
2026-01-18 06:58:10 +01:00
committed by Max Wilfinger
parent b22bf2352a
commit f39c9e6b74
+10
View File
@@ -154,6 +154,16 @@ GeoFeatureGroupExtension::addObjects(std::vector<App::DocumentObject*> objects)
continue;
}
// Prevent from extracting children of nested groups fixed issue:#26743
// As groups manage their own local coordinate systems and children.
if (object->hasExtension(App::GeoFeatureGroupExtension::getExtensionClassTypeId())) {
if (!hasObject(object)) {
grp.push_back(object);
ret.push_back(object);
}
continue;
}
// cross CoordinateSystem links are not allowed, so we need to move the whole link group
std::vector<App::DocumentObject*> links = getCSRelevantLinks(object);
links.push_back(object);