From: mpv Date: Wed, 1 Jul 2015 11:59:04 +0000 (+0300) Subject: If extrusion loses sketch contour, it becomes invalid and no results are displayed X-Git-Tag: V_1.3.0~135 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ebf59abe16d4ccc81cd1eb506f1f897c06a41ccb;p=modules%2Fshaper.git If extrusion loses sketch contour, it becomes invalid and no results are displayed --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 5c9fd544e..e3e9f548b 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -230,8 +230,11 @@ void Model_Update::updateFeature(FeaturePtr theFeature, std::set& th } // this checking must be after the composite feature sub-elements processing: // composite feature status may depend on it's subelements - if (theFeature->data()->execState() == ModelAPI_StateInvalidArgument) + if (theFeature->data()->execState() == ModelAPI_StateInvalidArgument) { + theFeature->eraseResults(); + redisplayWithResults(theFeature, ModelAPI_StateInvalidArgument); // result also must be updated return; + } bool aJustUpdated = myJustUpdated.find(theFeature) != myJustUpdated.end(); @@ -282,7 +285,8 @@ ModelAPI_ExecState stateByReference(ObjectPtr theTarget, const ModelAPI_ExecStat if (theTarget) { ModelAPI_ExecState aRefState = theTarget->data()->execState(); if (aRefState == ModelAPI_StateMustBeUpdated) { - return ModelAPI_StateMustBeUpdated; + if (theCurrent == ModelAPI_StateDone) + return ModelAPI_StateMustBeUpdated; } else if (aRefState != ModelAPI_StateDone) { return ModelAPI_StateInvalidArgument; } @@ -412,11 +416,13 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { // if reference is null, it may mean that this reference is to other document // the does not supported by RefList: parameters may be recomputed if (!aRefObj->get() && theFeature->firstResult().get() && - theFeature->firstResult()->groupName() == ModelAPI_ResultParameter::group()) { - aState = ModelAPI_StateMustBeUpdated; + theFeature->firstResult()->groupName() == ModelAPI_ResultParameter::group()) { + if (aState == ModelAPI_StateDone) + aState = ModelAPI_StateMustBeUpdated; } else if (myJustUpdated.find(*aRefObj) != myJustUpdated.end() || - (aRefObj->get() && (*aRefObj)->data()->updateID() > theFeature->data()->updateID())) { - aState = ModelAPI_StateMustBeUpdated; + (aRefObj->get() && (*aRefObj)->data()->updateID() > theFeature->data()->updateID())) { + if (aState == ModelAPI_StateDone) + aState = ModelAPI_StateMustBeUpdated; } aState = stateByReference(*aRefObj, aState); }