From: mpv Date: Tue, 26 Apr 2016 08:02:37 +0000 (+0300) Subject: Fix for modification of parameters redo crash when sketch is presented in the document. X-Git-Tag: V_2.3.0~105 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=46627828e5b99205348705da744af2a8dd54c924;p=modules%2Fshaper.git Fix for modification of parameters redo crash when sketch is presented in the document. --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 93084549c..9125ca0f9 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -344,7 +344,7 @@ bool Model_Update::processFeature(FeaturePtr theFeature) int aCount = myProcessed[theFeature]; if (aCount > 100) { // too many repetition of processing (in VS it may crash on 330 with stack overflow) Events_Error::send( - "Feature '" + theFeature->data()->name() + "' is updtated in infinitive loop"); + "Feature '" + theFeature->data()->name() + "' is updated in infinitive loop"); return false; } myProcessed[theFeature] = aCount + 1; @@ -581,7 +581,8 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { for(; anIter != anAttributes.end(); anIter++) { AttributePointPtr aPointAttribute = std::dynamic_pointer_cast(*anIter); - if (aPointAttribute.get()) { + if (aPointAttribute.get() && (!aPointAttribute->textX().empty() || + !aPointAttribute->textY().empty() || !aPointAttribute->textZ().empty())) { if (myIsParamUpdated) { ModelAPI_AttributeEvalMessage::send(aPointAttribute, this); } @@ -601,7 +602,8 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { AttributePoint2DPtr aPoint2DAttribute = std::dynamic_pointer_cast(*anIter); if (aPoint2DAttribute.get()) { - if (myIsParamUpdated) { + if (myIsParamUpdated && (!aPoint2DAttribute->textX().empty() || + !aPoint2DAttribute->textY().empty())) { ModelAPI_AttributeEvalMessage::send(aPoint2DAttribute, this); } if ((!aPoint2DAttribute->textX().empty() && aPoint2DAttribute->expressionInvalid(0)) ||