]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bug #132 - problems on show image and polyline (V0_3_1).
authornds <nds@opencascade.com>
Wed, 27 Nov 2013 06:44:33 +0000 (06:44 +0000)
committernds <nds@opencascade.com>
Wed, 27 Nov 2013 06:44:33 +0000 (06:44 +0000)
src/HYDROGUI/HYDROGUI_Shape.cxx
src/HYDROGUI/resources/HYDROGUI_msg_en.ts

index d1de7c3c142610e103109ca306b1e0402e73a194..5c4aa75a37d79da14e8c3c2988a3ae209f38ffff 100644 (file)
@@ -59,6 +59,8 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_IsoAspect.hxx>
 
+#include <SUIT_MessageBox.h>
+
 #include <QColor>
 #include <QFile>
 
@@ -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 );
index 3ec3da74d5af6481009c3a4f692757ad586af538..a1d64bb05f1a8852ab7153869ab2be1fcd705317 100644 (file)
@@ -112,6 +112,14 @@ does not exist or you have not enough permissions to open it.</translation>
       <source>LOAD_ERROR</source>
       <translation>Study could not be loaded</translation>
     </message>
+    <message>
+      <source>FILE_ERROR</source>
+      <translation>File could not be created</translation>
+    </message>
+    <message>
+      <source>FILE_CAN_NOT_BE_CREATED</source>
+      <translation>The temporary file '%1' can not be created.</translation>
+    </message>
     <message>
       <source>OBJECT_EXISTS_IN_DOCUMENT</source>
       <translation>Object with name '%1' already exists in the document.</translation>