X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FParametersPlugin%2FParametersPlugin_Parameter.cpp;h=803ea9e43983c4b7403c967b18120636cb6bb364;hb=5a4405dc843479d921b53b83c181cbe9359414fe;hp=b6596f6e0f0da6e34b7f12d5f878782bb3c71d49;hpb=f6b4c912fee7eef10142c71c8c3e6c7c2487934b;p=modules%2Fshaper.git diff --git a/src/ParametersPlugin/ParametersPlugin_Parameter.cpp b/src/ParametersPlugin/ParametersPlugin_Parameter.cpp index b6596f6e0..803ea9e43 100644 --- a/src/ParametersPlugin/ParametersPlugin_Parameter.cpp +++ b/src/ParametersPlugin/ParametersPlugin_Parameter.cpp @@ -102,11 +102,15 @@ double ParametersPlugin_Parameter::evaluate(const std::string& theExpression, st for ( ; it != anExprParams.end(); it++) { std::string& aVariableName = *it; - // parameter with the same name should be searched in the parent document - // currently there is no way to get parent document, so we get PartSet doc + // Parameter with the same name should be searched in the parent document. + // For the PartSet assume that the parameter is absent. + // Currently there is no way to get parent document, so we get PartSet for all. DocumentPtr aDocument = document(); - if (data()->name() == aVariableName) + if (data()->name() == aVariableName) { + if (aDocument == ModelAPI_Session::get()->moduleDocument()) + continue; aDocument = ModelAPI_Session::get()->moduleDocument(); + } double aValue; ResultParameterPtr aParamRes;