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

* App: Prevent from extracting children of nested groups

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>

* Update src/App/GeoFeatureGroupExtension.cpp

---------

Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
Co-authored-by: Kacper Donat <kadet1090@gmail.com>
This commit is contained in:
Yash Suthar
2026-01-18 07:35:43 +05:30
committed by GitHub
parent afb1c35416
commit 72b13cd8fc

View File

@@ -156,6 +156,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);