]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #862: abort operations on save
authorasl <asl@opencascade.com>
Fri, 28 Aug 2015 04:51:01 +0000 (07:51 +0300)
committerasl <asl@opencascade.com>
Mon, 31 Aug 2015 12:03:04 +0000 (15:03 +0300)
src/NewGeom/NewGeom_Module.cpp
src/NewGeom/NewGeom_Module.h

index 71bde789c1430df7f7d5a73f366db1e8cc53a593..dae10ab346092acb362abc9a5945eea7d404e451 100644 (file)
@@ -123,7 +123,10 @@ void NewGeom_Module::initialize(CAM_Application* theApp)
   myWorkshop->startApplication();
   LightApp_Application* anApp = dynamic_cast<LightApp_Application*>(theApp);
   if (anApp)
+  {
     connect(anApp, SIGNAL(preferenceResetToDefaults()), this, SLOT(onDefaultPreferences()));
+    connect(anApp, SIGNAL(abortAllOperations( bool& )), this, SLOT(onAbortAllOperations( bool& )));
+  }
 }
 
 //******************************************************
@@ -622,3 +625,8 @@ void NewGeom_Module::inspectSalomeModules()
     Config_ModuleReader::addDependencyModule(eachModule.toStdString());
   }
 }
+
+void NewGeom_Module::onAbortAllOperations( bool& isNextOperationAllowed )
+{
+  isNextOperationAllowed = workshop()->operationMgr()->abortAllOperations();
+}
index 0ba1345b7bc16fde13e07148f6e092c11f3c2494..2275931fedb2d05c58dee343e304634eb7e2aec1 100644 (file)
@@ -157,6 +157,8 @@ Q_OBJECT
   /// Obtains the current application and updates its actions
   void onUpdateCommandStatus();
 
+  void onAbortAllOperations( bool& );
+
  protected:
    /// Create data model
   CAM_DataModel* createDataModel();