From 2e27ede98ce02731b5fadc50b380e13f5baf5813 Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 12 Dec 2008 11:34:14 +0000 Subject: [PATCH] Bug 0020074: EDF VISU: Saving picture of animation crashes SALOME. --- src/VISUGUI/VISU_msg_en.ts | 9 +++++++++ src/VISUGUI/VisuGUI_FindPane.cxx | 1 + src/VISUGUI/VisuGUI_TimeAnimation.cxx | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts index 94dbd01b..a9557c89 100644 --- a/src/VISUGUI/VISU_msg_en.ts +++ b/src/VISUGUI/VISU_msg_en.ts @@ -3253,6 +3253,15 @@ Please, provide non-empty resulting presentation. Tool jpeg2yuv, necessary for AVI recording, is not available. Please, refer to the documentation. + + MSG_NO_SUPPORTED_IMAGE_FORMATS + There are no formats available for images output. +Please, refer to the QT documentation. + + + MSG_INVALID_IMAGE_FORMAT_INDEX + Selected image format is out of supported scope. + VisuGUI_TransparencyDlg diff --git a/src/VISUGUI/VisuGUI_FindPane.cxx b/src/VISUGUI/VisuGUI_FindPane.cxx index ef439736..e6c279f4 100644 --- a/src/VISUGUI/VisuGUI_FindPane.cxx +++ b/src/VISUGUI/VisuGUI_FindPane.cxx @@ -56,6 +56,7 @@ VisuGUI_FindPane::VisuGUI_FindPane( QWidget* theParent ) : QGroupBox( theParent ), myCurrentPage( 0 ), + mySelectionMode( -1 ), myActor( 0 ) { setTitle( tr( "FIND_TITLE" ) ); diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index 8ae5836a..88da99d5 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -2136,6 +2136,14 @@ void VisuGUI_TimeAnimationDlg::restoreFromStudy(_PTR(SObject) theAnimation) void VisuGUI_TimeAnimationDlg::onPicsFormatChanged() { QList 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())); } -- 2.39.2