]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make fix for the update of "Apply" button when in Booleans Tool list contains some...
authormpv <mpv@opencascade.com>
Thu, 28 Apr 2016 15:00:29 +0000 (18:00 +0300)
committermpv <mpv@opencascade.com>
Thu, 28 Apr 2016 15:00:29 +0000 (18:00 +0300)
src/Model/Model_Update.cpp

index 8886c5f02e32102a56b3eea79d454264e420110d..6af22b5b9784cf36b2a69608b8e601f220151d2e 100644 (file)
@@ -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;
   }