From: asl Date: Fri, 28 Aug 2015 04:51:01 +0000 (+0300) Subject: Issue #862: abort operations on save X-Git-Tag: V_1.4.0_beta4~185 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=34f401890d4f21c13cceef473afb8fee6c0a9b59;p=modules%2Fshaper.git Issue #862: abort operations on save --- diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 71bde789c..dae10ab34 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -123,7 +123,10 @@ void NewGeom_Module::initialize(CAM_Application* theApp) myWorkshop->startApplication(); LightApp_Application* anApp = dynamic_cast(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(); +} diff --git a/src/NewGeom/NewGeom_Module.h b/src/NewGeom/NewGeom_Module.h index 0ba1345b7..2275931fe 100644 --- a/src/NewGeom/NewGeom_Module.h +++ b/src/NewGeom/NewGeom_Module.h @@ -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();