From: mpv Date: Thu, 28 Apr 2016 15:00:29 +0000 (+0300) Subject: Make fix for the update of "Apply" button when in Booleans Tool list contains some... X-Git-Tag: V_2.3.0~72 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c846761628dc73953b41de1c4374430d327562ed;p=modules%2Fshaper.git Make fix for the update of "Apply" button when in Booleans Tool list contains some object and then become empty. --- diff --git a/src/Model/Model_Update.cpp b/src/Model/Model_Update.cpp index 8886c5f02..6af22b5b9 100644 --- a/src/Model/Model_Update.cpp +++ b/src/Model/Model_Update.cpp @@ -86,11 +86,11 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) { updateArguments(theFeature); aCurrentlyUpdated.erase(theFeature); } - if (theFeature->data()->execState() == ModelAPI_StateMustBeUpdated) { - theFeature->data()->execState(ModelAPI_StateDone); - static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators(); - aFactory->validate(theFeature); // need to be validated to update the "Apply" state if not previewed - } + // make it without conditions otherwise the apply button may have a bad state + theFeature->data()->execState(ModelAPI_StateDone); + static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators(); + aFactory->validate(theFeature); // need to be validated to update the "Apply" state if not previewed + if (!myIsPreviewBlocked) return true; }