]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
fixed issue from validation of feature
authorJérôme <jerome.lucas@cesgenslab.fr>
Fri, 13 Nov 2020 15:49:07 +0000 (16:49 +0100)
committerJérôme <jerome.lucas@cesgenslab.fr>
Thu, 3 Dec 2020 13:49:55 +0000 (14:49 +0100)
src/BuildPlugin/BuildPlugin_Interpolation.cpp
src/BuildPlugin/BuildPlugin_Validators.h
src/InitializationPlugin/InitializationPlugin_EvalListener.cpp

index 13506b77e6cb7e8dd184fda8787ee24ab437706d..59e91ca81b18e1f404e365f2f8c1116172144760 100644 (file)
@@ -123,8 +123,7 @@ void BuildPlugin_Interpolation::attributeChanged(const std::string& theID)
     && string(XT_ID())->value() !=""
     && string(YT_ID())->value() !=""
     && string(ZT_ID())->value() !=""
-    && string(CREATION_METHOD_ID())->value() == CREATION_METHOD_ANALYTICAL_ID()
-    ){
+    && string(CREATION_METHOD_ID())->value() == CREATION_METHOD_ANALYTICAL_ID()){
     updateCoordinates();
   }
 }
@@ -151,8 +150,12 @@ void BuildPlugin_Interpolation::updateCoordinates()
     }
 
     outErrorMessage="";
-
     evaluate(outErrorMessage);
+    data()->string(EXPRESSION_ERROR_ID())->setValue(outErrorMessage);
+    if (!outErrorMessage.empty()){
+      setError("Error: Python interpreter "); //+ outErrorMessage );
+      return;
+    }
 }
 
 //=================================================================================================
@@ -249,10 +252,6 @@ void BuildPlugin_Interpolation::execute()
         ||tables(VALUE_ID())->rows()== 0  )
       return;
 
-    if (!outErrorMessage.empty()){
-      setError("Error Python interpreter :" + outErrorMessage, false );
-      return;
-    }
     bool aWasBlocked = data()->blockSendAttributeUpdated(true);
     updateCoordinates();
     data()->blockSendAttributeUpdated(aWasBlocked, false);
index ffb8b0fbb7bbc37427726f7e1704e4b76ddbdd95..9b2b5194ccf3a42f9e4b614a4e84e588c38fcad7 100644 (file)
@@ -154,5 +154,4 @@ class BuildPlugin_ValidatorExpressionInterpolation
                        Events_InfoMessage& theError) const;
 };
 
-
 #endif
index 9268004a47b8166cda1180faae020d76b2b8103f..67de035b1579454ec124e17ff7798747e1fe5cea 100644 (file)
@@ -139,8 +139,8 @@ void InitializationPlugin_EvalListener::processEvent(
                                  anError,
                                  aParamsList,
                                  anIsFirstTime);
+        if(!anError.empty()) break;
         anValueAttr->setValue(aVal,step,1);
-        if( !anError.empty()) break;
         anExprAttr = aParam->string(BuildPlugin_Interpolation::YT_ID());
         anExp = anExprAttr->isUValue() ?
         Locale::Convert::toWString(anExprAttr->valueU()) :
@@ -152,8 +152,8 @@ void InitializationPlugin_EvalListener::processEvent(
                                 anError,
                                 aParamsList,
                                 anIsFirstTime);
+        if(!anError.empty()) break;
         anValueAttr->setValue(aVal,step,2);
-        if( !anError.empty()) break;
         anExprAttr = aParam->string(BuildPlugin_Interpolation::ZT_ID());
         anExp = anExprAttr->isUValue() ?
         Locale::Convert::toWString(anExprAttr->valueU()) :
@@ -165,7 +165,7 @@ void InitializationPlugin_EvalListener::processEvent(
                                  anError,
                                  aParamsList,
                                  anIsFirstTime);
-        if( !anError.empty()) break;
+        if(!anError.empty()) break;     
         anValueAttr->setValue(aVal,step,3);
         if ( anIsFirstTime )
             anIsFirstTime = false;