]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bug #334: Different behavior in Edit calculation case input panel.
authormzn <mzn@opencascade.com>
Wed, 29 Jan 2014 08:36:14 +0000 (08:36 +0000)
committermzn <mzn@opencascade.com>
Wed, 29 Jan 2014 08:36:14 +0000 (08:36 +0000)
src/HYDROGUI/HYDROGUI_CalculationOp.cxx

index 377e821bd26123f93e0aed521f49c743bc0f86ac..f6bd84498bef201b439aa22cf2c74f8d8cbe49dd 100644 (file)
@@ -797,8 +797,15 @@ void HYDROGUI_CalculationOp::setAvailableGroups()
       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 );