From: mpv Date: Mon, 25 May 2015 08:44:03 +0000 (+0300) Subject: Optimization of working with parameters X-Git-Tag: V_1.2.0~101 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a56db4993bab53bc45a338337142fe59a755f95b;p=modules%2Fshaper.git Optimization of working with parameters --- diff --git a/src/Model/Model_AttributeDouble.cpp b/src/Model/Model_AttributeDouble.cpp index 86cbc9e14..29ca7be4e 100644 --- a/src/Model/Model_AttributeDouble.cpp +++ b/src/Model/Model_AttributeDouble.cpp @@ -44,7 +44,7 @@ void Model_AttributeDouble::setText(const std::string& theValue) TCollection_ExtendedString aValue(theValue.c_str()); if (myText->Get() != aValue) { myText->Set(aValue); - //owner()->data()->sendAttributeUpdated(this); ? + owner()->data()->sendAttributeUpdated(this); } } diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 50d73e311..8eae85c93 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -197,6 +197,7 @@ void Model_Update::updateInDoc(std::shared_ptr theDoc) // number of subs can be changed in execution: like fillet for(int a = 0; a < aComposite->numberOfSubs(); a++) { FeaturePtr aSub = aComposite->subFeature(a); + updateArguments(aSub); updateFeature(aSub); alreadyProcessed.insert(aSub); } @@ -257,7 +258,10 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { bool aJustUpdated = false; ModelAPI_ExecState aState = theFeature->data()->execState(); + if (aState == ModelAPI_StateInvalidArgument) // a chance to be corrected + aState = ModelAPI_StateMustBeUpdated; // check the parameters: values can be changed + /* parameters evaluator now does this std::list aDoubles = theFeature->data()->attributes(ModelAPI_AttributeDouble::typeId()); std::list::iterator aDoubleIter = aDoubles.begin(); @@ -276,6 +280,7 @@ void Model_Update::updateArguments(FeaturePtr theFeature) { } } } + */ //if (aState == ModelAPI_StateDone) {// all referenced objects are ready to be used //std::cout<<"Execute feature "<getKind()<validators(); - if (theFeature->isDisabled()) // nothing to do with disabled feature + if (theFeature->isDisabled() || // nothing to do with disabled feature + theFeature->data()->execState() == ModelAPI_StateInvalidArgument) return; bool aJustUpdated = false;