From: mzn Date: Wed, 20 Nov 2013 15:49:23 +0000 (+0000) Subject: Simplify the error message. X-Git-Tag: BR_hydro_v_0_3_1~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=efe1ef3a24e517f2397fc6cd5a35fa0c1b2f118f;p=modules%2Fhydro.git Simplify the error message. --- diff --git a/src/HYDROGUI/HYDROGUI_ExportCalculationOp.cxx b/src/HYDROGUI/HYDROGUI_ExportCalculationOp.cxx index 65b86410..f978dccd 100644 --- a/src/HYDROGUI/HYDROGUI_ExportCalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportCalculationOp.cxx @@ -83,6 +83,7 @@ bool HYDROGUI_ExportCalculationOp::processApply( int& theUpdateFlags, return false; } + QString anErrorMsg; bool anIsOk = false; TopoDS_Shell aShell = aCalculation->GetShell(); @@ -124,11 +125,15 @@ bool HYDROGUI_ExportCalculationOp::processApply( int& theUpdateFlags, } } } else { - theErrorMsg = tr( "RESULT_SHAPE_NULL" ); + anErrorMsg = tr( "RESULT_SHAPE_NULL" ); } - if ( !anIsOk && theErrorMsg.isEmpty() ) { + if ( !anIsOk ) { theErrorMsg = tr( "EXPORT_FAILED" ); + + if( !anErrorMsg.isEmpty() ) { + theErrorMsg.prepend( anErrorMsg + "\n" ); + } } return anIsOk; @@ -170,9 +175,11 @@ void HYDROGUI_ExportCalculationOp::onApply() } else { abort(); - QString aMsg = tr( "INPUT_VALID_DATA" ); + QString aMsg = tr( "EXPORT_FAILED" ); + /* TODO: improve error processing if( !anErrorMsg.isEmpty() ) aMsg.prepend( anErrorMsg + "\n" ); + */ SUIT_MessageBox::critical( module()->getApp()->desktop(), tr( "EXPORT_STATUS" ), aMsg );