]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix an infinite loop
authoreap <eap@opencascade.com>
Thu, 23 Jan 2020 18:45:33 +0000 (21:45 +0300)
committereap <eap@opencascade.com>
Thu, 23 Jan 2020 18:45:33 +0000 (21:45 +0300)
src/ConnectorPlugin/ConnectorPlugin_PublishToStudyFeature.py

index 5f65ef4a6cf5f31f3e4acc4bb6de9bcbe6811b37..509b9a31b2569aacbafaf8bc1dcf2d94f28dcaef 100644 (file)
@@ -112,6 +112,7 @@ class PublishToStudyFeature(ModelAPI.ModelAPI_Feature):
         aSOIter = SHAPERSTUDY_utils.getStudy().NewChildIterator(aComponent)
         while aSOIter.More():
           aSO = aSOIter.Value()
+          aSOIter.Next() ### here because there is continue inside the loop!
           anIOR = aSO.GetIOR()
           if len(anIOR):
             anObj = salome.orb.string_to_object(anIOR)
@@ -127,7 +128,6 @@ class PublishToStudyFeature(ModelAPI.ModelAPI_Feature):
                   if aRes:
                     aBuilder = SHAPERSTUDY_utils.getStudy().NewBuilder()
                     aBuilder.RemoveReference(aSO2)
-          aSOIter.Next()
 
     # Part of the "execute" method: processes the Groups of theRes result publication.
     # If theFields is true, the same is performed for Fields.