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:
@@ -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