#include <Prs3d_LineAspect.hxx>
#include <Prs3d_IsoAspect.hxx>
+#include <SUIT_MessageBox.h>
+
#include <QColor>
#include <QFile>
// 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 );
<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>