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]>
This commit is contained in:
co-authored by
Kacper Donat
parent
cf93c33359
commit
7aafb105f7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user