From: vsv Date: Thu, 6 Sep 2018 09:27:41 +0000 (+0300) Subject: Check state of auto update blocked on operations. Switch Off the state on save a... X-Git-Tag: V9_2_0a1~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00580238b84621c46d2c8f2f24e9cfc953852040;p=modules%2Fshaper.git Check state of auto update blocked on operations. Switch Off the state on save a document. --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 9c6c4fd88..82495a49f 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -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 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);