]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2337: crash when Undo Insert a Folder before
authorazv <azv@opencascade.com>
Wed, 6 Dec 2017 07:39:31 +0000 (10:39 +0300)
committermpv <mpv@opencascade.com>
Wed, 6 Dec 2017 14:39:31 +0000 (17:39 +0300)
Reinitialize folders iterator each time any folder is removed from the map of labels and corresponding folders.

src/Model/Model_Objects.cpp

index 3a933410b1bdb405ffb5fead5fb907c5e5e9e414..1308ec27f195309a92ade31f42a0660cc4c61ba5 100644 (file)
@@ -898,6 +898,8 @@ void Model_Objects::synchronizeFeatures(
       // unbind after the "erase" call: on abort sketch
       // is removes sub-objects that corrupts aFIter
       myFolders.UnBind(aFldIt.Key());
+      // reinitialize iterator because unbind may corrupt the previous order in the map
+      aFldIt.Initialize(myFolders);
     }
   }