From d2d2eeaa78b59e8dff903cbaf1cdeb61b6e0de6a Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 22 May 2015 14:28:35 +0300 Subject: [PATCH] refs #530: patch after apply/close redesign --- src/HYDROGUI/HYDROGUI_ImportImageOp.cxx | 11 ++++++++++- src/HYDROGUI/HYDROGUI_Operation.cxx | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index a3d2c72e..bf837ade 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -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; } diff --git a/src/HYDROGUI/HYDROGUI_Operation.cxx b/src/HYDROGUI/HYDROGUI_Operation.cxx index c40c99c2..e40ff69d 100644 --- a/src/HYDROGUI/HYDROGUI_Operation.cxx +++ b/src/HYDROGUI/HYDROGUI_Operation.cxx @@ -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() ) -- 2.39.2