]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #2674 : Fatal error when undo remove part
authormpv <mpv@opencascade.com>
Thu, 4 Oct 2018 13:47:51 +0000 (16:47 +0300)
committermpv <mpv@opencascade.com>
Thu, 4 Oct 2018 13:47:51 +0000 (16:47 +0300)
src/Model/Model_Objects.cpp

index 35d3eaf1d160d7892ebfa49342b474268f321337..6fc21e71e26da169c55bb0d31f06d3667d879b7c 100644 (file)
@@ -1988,11 +1988,12 @@ FeaturePtr Model_Objects::lastFeature()
 {
   Handle(TDataStd_ReferenceArray) aRefs;
   if (featuresLabel().FindAttribute(TDataStd_ReferenceArray::GetID(), aRefs)) {
-    FeaturePtr aLast = feature(aRefs->Value(aRefs->Upper()));
+    // comment this because of #2674 - features are removed from array on deactivation of Part
+    /*FeaturePtr aLast = feature(aRefs->Value(aRefs->Upper()));
     if (!aLast.get() && aRefs->Length() != 0) { // erase the invalid feature from the array
       RemoveFromRefArray(featuresLabel(), aRefs->Value(aRefs->Upper()));
       return lastFeature(); // try once again, after the last was removed
-    }
+    }*/
     return feature(aRefs->Value(aRefs->Upper()));
   }
   return FeaturePtr(); // no features at all