]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Check state of auto update blocked on operations. Switch Off the state on save a...
authorvsv <vsv@opencascade.com>
Thu, 6 Sep 2018 09:27:41 +0000 (12:27 +0300)
committervsv <vsv@opencascade.com>
Thu, 6 Sep 2018 09:27:41 +0000 (12:27 +0300)
src/XGUI/XGUI_Workshop.cpp

index 9c6c4fd88358b5e6af15afd94a02c7791386b3e5..82495a49f2001c081a6ccb50ce22db858b0293b8 100755 (executable)
@@ -1052,6 +1052,10 @@ bool XGUI_Workshop::onSave()
   if (myCurrentDir.isEmpty()) {
     return onSaveAs();
   }
+  SessionPtr aMgr = ModelAPI_Session::get();
+  if (aMgr->isAutoUpdateBlocked())
+    aMgr->blockAutoUpdate(false);
+
   std::list<std::string> aFiles;
   saveDocument(myCurrentDir, aFiles);
   updateCommandStatus();
@@ -1324,6 +1328,9 @@ void XGUI_Workshop::updateCommandStatus()
         else
           aCmd->setEnabled(myModule->canRedo());
       }
+      else if (aId == "AUTOCOMPUTE_CMD") {
+        aCmd->setChecked(aMgr->isAutoUpdateBlocked());
+      }
       else
         // Enable all commands
         aCmd->setEnabled(true);