]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug 0020074: EDF VISU: Saving picture of animation crashes SALOME.
authorjfa <jfa@opencascade.com>
Fri, 12 Dec 2008 11:34:14 +0000 (11:34 +0000)
committerjfa <jfa@opencascade.com>
Fri, 12 Dec 2008 11:34:14 +0000 (11:34 +0000)
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI_FindPane.cxx
src/VISUGUI/VisuGUI_TimeAnimation.cxx

index 94dbd01bfe23ee9508d52252d18eb78ce54eeb4c..a9557c894940c36994ad961c776adf2f94e773a3 100644 (file)
@@ -3253,6 +3253,15 @@ Please, provide non-empty resulting presentation.</translation>
             <translation>Tool jpeg2yuv, necessary for AVI recording, is not available.
 Please, refer to the documentation.</translation>
         </message>
+        <message>
+            <source>MSG_NO_SUPPORTED_IMAGE_FORMATS</source>
+            <translation>There are no formats available for images output.
+Please, refer to the QT documentation.</translation>
+        </message>
+        <message>
+            <source>MSG_INVALID_IMAGE_FORMAT_INDEX</source>
+            <translation>Selected image format is out of supported scope.
+        </message>
     </context>
     <context>
         <name>VisuGUI_TransparencyDlg</name>
index ef4397362fc28d79d4828840911bfc5238309ae3..e6c279f45905b4fb5fceac68e9c8d2020a68875d 100644 (file)
@@ -56,6 +56,7 @@
 VisuGUI_FindPane::VisuGUI_FindPane( QWidget* theParent ) :
   QGroupBox( theParent ),
   myCurrentPage( 0 ),
+  mySelectionMode( -1 ),
   myActor( 0 )
 {
   setTitle( tr( "FIND_TITLE" ) );
index 8ae5836a5122c85356071d697d6097c0b2415fea..88da99d57b9ffd86c8e04d734d15ed71cbdc4d6c 100644 (file)
@@ -2136,6 +2136,14 @@ void VisuGUI_TimeAnimationDlg::restoreFromStudy(_PTR(SObject) theAnimation)
 void VisuGUI_TimeAnimationDlg::onPicsFormatChanged()
 {
   QList<QByteArray> aDumpFormats = QImageWriter::supportedImageFormats();
+  if (aDumpFormats.count() < 1) {
+    SUIT_MessageBox::warning(this, tr("ERROR"), tr("MSG_NO_SUPPORTED_IMAGE_FORMATS"), tr("&OK"));
+    return;
+  }
+  if (myPicsFormat->currentIndex() < 0 || aDumpFormats.count() <= myPicsFormat->currentIndex()) {
+    SUIT_MessageBox::warning(this, tr("ERROR"), tr("MSG_INVALID_IMAGE_FORMAT_INDEX"), tr("&OK"));
+    return;
+  }
   myAnimator->setDumpFormat(aDumpFormats.at(myPicsFormat->currentIndex()));
 }