]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2628 : crash on move history line outside of folder. Correct management of...
authormpv <mpv@opencascade.com>
Fri, 7 Sep 2018 06:02:19 +0000 (09:02 +0300)
committermpv <mpv@opencascade.com>
Fri, 7 Sep 2018 06:02:19 +0000 (09:02 +0300)
src/Model/Model_Objects.cpp

index 1fdd49ac3c83d260168fe0fcf01059cd7ba0bf4f..1b8dad602a530662715676095a544506794aa6fd 100644 (file)
@@ -378,6 +378,9 @@ void Model_Objects::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis)
   if (theAfterThis.get())
     anAfterLab = std::dynamic_pointer_cast<Model_Data>(theAfterThis->data())->label().Father();
 
+  // check whether some folder refers to the moved feature by start or end: if yes, remove from it
+  removeFromFolder(std::list<FeaturePtr>(1, theMoved));
+
   Handle(TDataStd_HLabelArray1) aNewArray =
     new TDataStd_HLabelArray1(aRefs->Lower(), aRefs->Upper());
   int aPassedMovedFrom = 0; // the prev feature location is found and passed