From: nds Date: Wed, 27 Nov 2013 06:44:33 +0000 (+0000) Subject: Bug #132 - problems on show image and polyline (V0_3_1). X-Git-Tag: issue_132_11_28~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=18ce335801a9ea2cb5f267ffc986c93f402bf720;p=modules%2Fhydro.git Bug #132 - problems on show image and polyline (V0_3_1). --- diff --git a/src/HYDROGUI/HYDROGUI_Shape.cxx b/src/HYDROGUI/HYDROGUI_Shape.cxx index d1de7c3c..5c4aa75a 100644 --- a/src/HYDROGUI/HYDROGUI_Shape.cxx +++ b/src/HYDROGUI/HYDROGUI_Shape.cxx @@ -59,6 +59,8 @@ #include #include +#include + #include #include @@ -217,7 +219,12 @@ void HYDROGUI_Shape::update( const bool theIsUpdateViewer ) // temporary optimization, to reduce the saved image size (and the texture quality) QImage anImageToSave = reduceTexture( anImage, 500 ); - anImageToSave.save( aTextureFileName ); + bool isSaved = anImageToSave.save( aTextureFileName ); + if ( !isSaved ) { + QString aTitle = QObject::tr( "FILE_ERROR" ); + QString aMessage = QObject::tr( "FILE_CAN_NOT_BE_CREATED" ).arg( aTextureFileName ); + SUIT_MessageBox::warning( 0, aTitle, aMessage ); + } QPointF aPoint1( 0, 0 ); QPointF aPoint2( aWidth, 0 ); diff --git a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts index 3ec3da74..a1d64bb0 100644 --- a/src/HYDROGUI/resources/HYDROGUI_msg_en.ts +++ b/src/HYDROGUI/resources/HYDROGUI_msg_en.ts @@ -112,6 +112,14 @@ does not exist or you have not enough permissions to open it. LOAD_ERROR Study could not be loaded + + FILE_ERROR + File could not be created + + + FILE_CAN_NOT_BE_CREATED + The temporary file '%1' can not be created. + OBJECT_EXISTS_IN_DOCUMENT Object with name '%1' already exists in the document.