From: mpv Date: Fri, 28 Feb 2020 11:43:55 +0000 (+0300) Subject: Fix for the issue #3143 : Number of parts is wrong for document with Linear copy X-Git-Tag: V9_5_0a2~75 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=dfc8fd457f581aad52285d0a5b289e3215b189db;p=modules%2Fshaper.git Fix for the issue #3143 : Number of parts is wrong for document with Linear copy --- diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 047a4c105..6d40674d3 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -1888,10 +1888,12 @@ void Model_Objects::updateResults(FeaturePtr theFeature, std::set& t if (aResIndex <= theFeature->results().size()) { // to avoid crash if previous execute // for index = 0 erases result std::shared_ptr aNewP = createPart(theFeature->data(), aResIndex); - theFeature->setResult(aNewP, aResIndex); - if (!aNewP->partDoc().get()) - // create the part result: it is better to restore the previous result if possible - theFeature->execute(); + if (!aNewP->data()->isDeleted()) { + theFeature->setResult(aNewP, aResIndex); + if (!aNewP->partDoc().get()) + // create the part result: it is better to restore the previous result if possible + theFeature->execute(); + } } } else if (aGroup->Get() == ModelAPI_ResultConstruction::group().c_str()) { ResultConstructionPtr aConstr = createConstruction(theFeature->data(), aResIndex);