From 72b13cd8fc9ab76825fd7f539fa50defcb70c854 Mon Sep 17 00:00:00 2001 From: Yash Suthar Date: Sun, 18 Jan 2026 07:35:43 +0530 Subject: [PATCH] App: Prevent addObjects from extracting children of nested groups (#26846) * App: Prevent from extracting children of nested groups Signed-off-by: Yash Suthar * Update src/App/GeoFeatureGroupExtension.cpp --------- Signed-off-by: Yash Suthar Co-authored-by: Kacper Donat --- src/App/GeoFeatureGroupExtension.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/App/GeoFeatureGroupExtension.cpp b/src/App/GeoFeatureGroupExtension.cpp index 8b1e5cbfa1..dbc16ddbda 100644 --- a/src/App/GeoFeatureGroupExtension.cpp +++ b/src/App/GeoFeatureGroupExtension.cpp @@ -156,6 +156,16 @@ GeoFeatureGroupExtension::addObjects(std::vector 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 links = getCSRelevantLinks(object); links.push_back(object);