From: asl Date: Fri, 22 May 2015 11:28:35 +0000 (+0300) Subject: refs #530: patch after apply/close redesign X-Git-Tag: v1.4.1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d2d2eeaa78b59e8dff903cbaf1cdeb61b6e0de6a;p=modules%2Fhydro.git refs #530: patch after apply/close redesign --- 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() )