]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #530: patch after apply/close redesign
authorasl <asl@opencascade.com>
Fri, 22 May 2015 11:28:35 +0000 (14:28 +0300)
committerasl <asl@opencascade.com>
Fri, 22 May 2015 11:28:35 +0000 (14:28 +0300)
src/HYDROGUI/HYDROGUI_ImportImageOp.cxx
src/HYDROGUI/HYDROGUI_Operation.cxx

index a3d2c72e040aaed1a8d230cd4604687abf75e997..bf837ade79e883bcac198a7b6be658d5d2aa1fab 100644 (file)
@@ -509,14 +509,23 @@ bool HYDROGUI_ImportImageOp::processApply( int& theUpdateFlags,
   if ( isApplyAndClose() )
     theUpdateFlags |= UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced;
 
+  if( isApplyAndClose() )
+  {
+    commitDocOperation(); // to save the modifications in the data model
+    return true;
+  }
 
   if( SetNextFile() )
   {
     theErrorMsg = "";
-    commitDocOperation(); // to save the modifications in the data model
+    module()->updateObjBrowser();
     return false;         // and to continue the operation
   }
 
+  /*if( myFiles.count() > 1 )
+  {
+    setIsApplyAndClose( true );
+  }*/
   return true;
 }
 
index c40c99c2e02301d80fc0263bc3d090630dfc148b..e40ff69de68a57e55bf94a9137603fe1e5d04a0f 100644 (file)
@@ -252,7 +252,7 @@ void HYDROGUI_Operation::apply()
     if ( !myIsApplyAndClose && inputPanel() )
       start();
   }
-  else
+  else if( !anErrorMsg.isEmpty() )
   {
     // Abort document opeartion only if requested
     if ( isToAbortOnApply() )