]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for modification of parameters redo crash when sketch is presented in the document.
authormpv <mpv@opencascade.com>
Tue, 26 Apr 2016 08:02:37 +0000 (11:02 +0300)
committermpv <mpv@opencascade.com>
Tue, 26 Apr 2016 08:02:37 +0000 (11:02 +0300)
src/Model/Model_Update.cpp

index 93084549c982ae2918f8e772012fa36e7fcc21e2..9125ca0f9b3a99d3ed34de0b178ed513b9716c03 100644 (file)
@@ -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<GeomDataAPI_Point>(*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<GeomDataAPI_Point2D>(*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)) ||