From: mpv Date: Thu, 4 Oct 2018 13:47:51 +0000 (+0300) Subject: Fix for the issue #2674 : Fatal error when undo remove part X-Git-Tag: CEA_2018-2~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5cb793e253baee2033e45222989ec8cb18b2d869;p=modules%2Fshaper.git Fix for the issue #2674 : Fatal error when undo remove part --- diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 35d3eaf1d..6fc21e71e 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -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