]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
21684: EDF 2221 : Display the arguments and the name of the operations
authoreap <eap@opencascade.com>
Tue, 15 Oct 2013 10:30:22 +0000 (10:30 +0000)
committereap <eap@opencascade.com>
Tue, 15 Oct 2013 10:30:22 +0000 (10:30 +0000)
In removeStep(self,step) remove it from a study as well

src/GEOM_SWIG/geomBuilder.py

index bcf8ef0f4222850b518ce9fe99e39b118e330ab6..7d9ffde95cb2c073a9de8e0cc528354d9c61b200 100644 (file)
@@ -12641,7 +12641,18 @@ class geomField( GEOM._objref_GEOM_Field ):
     ## Remove a time step from the field
     def removeStep(self,step):
         "Remove a time step from the field"
+        stepSO = None
+        try:
+            stepObj = self.field.GetStep( self, step )
+            if stepObj:
+                stepSO = geom.myStudy.FindObjectID( stepObj.GetStudyEntry() )
+        except:
+            #import traceback
+            #traceback.print_exc()
+            pass
         self.field.RemoveStep( self, step )
+        if stepSO:
+            geom.myBuilder.RemoveObjectWithChildren( stepSO )
         return
 
     ## Returns number of time steps in the field