]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_Workshop.cpp
Salome HOME
Merge remote-tracking branch 'remotes/origin/master'
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index 462359e0976930a15071f07b66ef740c351b3a27..d2935f1eba3fb82fcd3c7a77066b8664c8a2261d 100755 (executable)
@@ -508,7 +508,7 @@ void XGUI_Workshop::onAcceptActionClicked()
                                                     (anOperationMgr->currentOperation());
     if (aFOperation) {
       //if (errorMgr()->canProcessClick(anAction, aFOperation->feature()))
-      myOperationMgr->commitOperation();
+      myOperationMgr->onCommitOperation();
     }
   }
 }
@@ -776,6 +776,12 @@ void XGUI_Workshop::saveDocument(const QString& theName, std::list<std::string>&
   QApplication::restoreOverrideCursor();
 }
 
+//******************************************************
+bool XGUI_Workshop::abortAllOperations()
+{
+  return myOperationMgr->abortAllOperations();
+}
+
 //******************************************************
 void XGUI_Workshop::operationStarted(ModuleBase_Operation* theOperation)
 {
@@ -791,7 +797,7 @@ void XGUI_Workshop::operationStarted(ModuleBase_Operation* theOperation)
 //******************************************************
 void XGUI_Workshop::onOpen()
 {
-  if(!myOperationMgr->abortAllOperations())
+  if(!abortAllOperations())
     return;
   //save current file before close if modified
   SessionPtr aSession = ModelAPI_Session::get();
@@ -921,7 +927,7 @@ void XGUI_Workshop::onTrihedronVisibilityChanged(bool theState)
 //******************************************************
 bool XGUI_Workshop::onSave()
 {
-  if(!myOperationMgr->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
+  if(!abortAllOperations())
     return false;
   if (myCurrentDir.isEmpty()) {
     return onSaveAs();
@@ -938,7 +944,7 @@ bool XGUI_Workshop::onSave()
 //******************************************************
 bool XGUI_Workshop::onSaveAs()
 {
-  if(!myOperationMgr->abortAllOperations(XGUI_OperationMgr::XGUI_InformationMessage))
+  if(!abortAllOperations())
     return false;
   QFileDialog dialog(desktop());
   dialog.setWindowTitle(tr("Select directory to save files..."));
@@ -1466,7 +1472,7 @@ void XGUI_Workshop::deleteObjects()
   }
 
   QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
-  if (!myOperationMgr->abortAllOperations())
+  if (!abortAllOperations())
     return;
 
   bool hasResult = false;
@@ -1533,7 +1539,7 @@ void addRefsToFeature(const FeaturePtr& theFeature,
 //**************************************************************
 void XGUI_Workshop::cleanHistory()
 {
-  if (!myOperationMgr->abortAllOperations())
+  if (!abortAllOperations())
     return;
 
   QObjectPtrList anObjects = mySelector->selection()->selectedObjects();
@@ -1659,7 +1665,7 @@ void XGUI_Workshop::cleanHistory()
 //**************************************************************
 void XGUI_Workshop::moveObjects()
 {
-  if (!myOperationMgr->abortAllOperations())
+  if (!abortAllOperations())
     return;
 
   SessionPtr aMgr = ModelAPI_Session::get();
@@ -1900,7 +1906,7 @@ void XGUI_Workshop::changeColor(const QObjectPtrList& theObjects)
   if (aColor.size() != 3)
     return;
 
-  if (!myOperationMgr->abortAllOperations())
+  if (!abortAllOperations())
   return;
   // 2. show the dialog to change the value
   XGUI_ColorDialog* aDlg = new XGUI_ColorDialog(desktop());
@@ -1990,7 +1996,7 @@ void XGUI_Workshop::changeDeflection(const QObjectPtrList& theObjects)
   if (aDeflection < 0)
     return;
 
-  if (!myOperationMgr->abortAllOperations())
+  if (!abortAllOperations())
   return;
   // 2. show the dialog to change the value
   XGUI_DeflectionDialog* aDlg = new XGUI_DeflectionDialog(desktop());