aGroupsNames.append( aGroup->GetName() );
}
}
- if( myEditedObject->IsMustBeUpdated() )
- myEditedObject->RemoveGeometryGroups();
+ if( myEditedObject->IsMustBeUpdated() ) {
+ for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ ) {
+ Handle(HYDROData_ShapesGroup) aGeomGroup =
+ Handle(HYDROData_ShapesGroup)::DownCast( aSeq.Value( anIndex ) );
+ if ( !aGeomGroup.IsNull() && !aGroupsNames.contains( aGeomGroup->GetName() ) ) {
+ myEditedObject->RemoveGeometryGroup( aGeomGroup );
+ }
+ }
+ }
aPanel->setAvailableGroups( aGroupsNames );
aPanel->includeGroups( aList );