]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Abort document operation after error in process apply (Bug #340).
authoradv <adv@opencascade.com>
Tue, 28 Jan 2014 06:20:33 +0000 (06:20 +0000)
committeradv <adv@opencascade.com>
Tue, 28 Jan 2014 06:20:33 +0000 (06:20 +0000)
src/HYDROGUI/HYDROGUI_Operation.cxx
src/HYDROGUI/HYDROGUI_Operation.h
src/HYDROGUI/HYDROGUI_StreamOp.h

index bdbd6fa05ffd1c86b4ea310a681dbf3f63b3ac1a..cd2ac6849a993eed670e8b5dad3bf86dae7263c9 100644 (file)
@@ -208,7 +208,10 @@ void HYDROGUI_Operation::onApply()
   }
   else
   {
-    abortDocOperation();
+    // Abort document opeartion only if requested
+    if ( isToAbortOnApply() )
+      abortDocOperation();
+
     printErrorMessage( anErrorMsg );
  
     // If the operation has no input panel - do abort
index 69cab654ccde1607d2b479171b5237ec469cb72e..5388d34b5b95aea64561291efcbe5a3acf025ed0 100644 (file)
@@ -72,6 +72,8 @@ protected:
 
   Handle_HYDROData_Document           doc() const;
 
+  virtual bool                        isToAbortOnApply() const { return true; }
+
   void                                printErrorMessage( const QString& theErrorMsg );
   void                                setPrintErrorMessage( const bool theIsPrint );
 
index 9e8730c8127fb3deb32a73605c6ec04d2c77f3f7..8d356e0ac76def86a719ed8c1c39f45712903e9c 100755 (executable)
@@ -48,6 +48,8 @@ protected:
 
   virtual bool                 processApply( int& theUpdateFlags, QString& theErrorMsg );
 
+  virtual bool                 isToAbortOnApply() const { return false; }
+
 private slots:
   void                         onAddProfiles();
   void                         onRemoveProfiles( const QStringList& );