From: enk Date: Fri, 10 Mar 2006 09:35:28 +0000 (+0000) Subject: Fix for Bug IPAL11830: X-Git-Tag: mergeto_trunk_13Mar06~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b1b3febfcebc27b97702f21cbe300c4612dd7ffe;p=modules%2Fvisu.git Fix for Bug IPAL11830: Incorrect title of the warning dialog box --- diff --git a/src/VISUGUI/VisuGUI_TimeAnimation.cxx b/src/VISUGUI/VisuGUI_TimeAnimation.cxx index fe72f1dd..c56ed5d9 100644 --- a/src/VISUGUI/VisuGUI_TimeAnimation.cxx +++ b/src/VISUGUI/VisuGUI_TimeAnimation.cxx @@ -93,7 +93,7 @@ ArrangeDlg::ArrangeDlg(QWidget* theParent, VISU_TimeAnimation* theAnimator) ArrangeDlg::ArrangeDlg(QWidget* theParent, SVTK_ViewWindow* theViewWindow) : QDialog(theParent, "ArrangeDlg", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu), - myAnimator(0), myViewWindow(theViewWindow) + myAnimator(NULL), myViewWindow(theViewWindow) { myCurrent = 0; init(); @@ -245,7 +245,7 @@ void ArrangeDlg::init() void ArrangeDlg::accept() { - if (myAnimator) { + if (myAnimator != NULL) { acceptAnimation(); } else { acceptViewWindow(); @@ -1159,7 +1159,10 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu //------------------------------------------------------------------------ VisuGUI_TimeAnimationDlg::~VisuGUI_TimeAnimationDlg() { - delete myAnimator; + if(myAnimator != NULL){ + delete myAnimator; + myAnimator = NULL; + } } //------------------------------------------------------------------------ @@ -1275,11 +1278,23 @@ void VisuGUI_TimeAnimationDlg::showEvent(QShowEvent* theEvent) //------------------------------------------------------------------------ void VisuGUI_TimeAnimationDlg::closeEvent (QCloseEvent* theEvent) { - myAnimator->stopAnimation(); - myAnimator->wait(500); - if (myAnimator->running() && (! myAnimator->finished())) { - isClosing = true; - myEvent = theEvent; + if(myAnimator != NULL){ + myAnimator->stopAnimation(); + myAnimator->wait(500); + if (myAnimator->running() && (! myAnimator->finished())) { + isClosing = true; + myEvent = theEvent; + // * Destroing data in myAnimator before study closed. + // * It needed for correcting destroing of myAnimator, which + // * depend from SVTK_RenderWindowInteractor() e.t.c. + if(theEvent->type() == QEvent::Close){ + for (int i = 0; i < myAnimator->getNbFields(); i++) + myAnimator->clearData(myAnimator->getFieldData(i)); + myAnimator->clearFieldData(); + } + } else { + QDialog::closeEvent(theEvent); + } } else { QDialog::closeEvent(theEvent); }