]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Make the feature with "preview" button updates the property panel "Apply" button...
authormpv <mpv@opencascade.com>
Tue, 12 Apr 2016 12:49:05 +0000 (15:49 +0300)
committermpv <mpv@opencascade.com>
Tue, 12 Apr 2016 12:49:05 +0000 (15:49 +0300)
src/Model/Model_Update.cpp

index ee33076dcac1548c6ecf95baceb731e8b46839d0..d49990aa5b267fd9b3e2b64e58136f3cf50f281a 100644 (file)
@@ -74,7 +74,8 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
       return false;
   }
 
-  if (!theFeature->isPreviewNeeded() && !myIsFinish) {
+  // update arguments for "apply button" state change
+  if ((!theFeature->isPreviewNeeded() && !myIsFinish) || myIsPreviewBlocked) {
     myProcessOnFinish.insert(theFeature);
 #ifdef DEB_UPDATE
       std::cout<<"*** Add process on finish "<<theFeature->name()<<std::endl;
@@ -85,7 +86,8 @@ bool Model_Update::addModified(FeaturePtr theFeature, FeaturePtr theReason) {
       static ModelAPI_ValidatorsFactory* aFactory = ModelAPI_Session::get()->validators();
       aFactory->validate(theFeature); // need to be validated to update the "Apply" state if not previewed
     }
-    return true;
+    if (!myIsPreviewBlocked)
+      return true;
   }
   if (myModified.find(theFeature) != myModified.end()) {
     if (theReason.get()) {