Salome HOME
Issue #374:Prevent switching viewer interaction mode. Clear operations on module...
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index a0ee892600a6e08320351deda27c4a0bf7d845ee..3900f6606298deaebac62257973a08d909367c77 100644 (file)
@@ -1356,6 +1356,11 @@ void XGUI_Workshop::setDisplayMode(const QObjectPtrList& theList, int theMode)
 //**************************************************************
 void XGUI_Workshop::closeDocument()
 {
+  ModuleBase_Operation* anOperation = operationMgr()->currentOperation();
+  while (anOperation) {
+    anOperation->abort();
+    anOperation = operationMgr()->currentOperation();
+  }
   myDisplayer->closeLocalContexts();
   myDisplayer->eraseAll();
   objectBrowser()->clearContent();