]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL8983: Close study during animation playing - SIGILL
authorjfa <jfa@opencascade.com>
Tue, 26 Jul 2005 09:54:24 +0000 (09:54 +0000)
committerjfa <jfa@opencascade.com>
Tue, 26 Jul 2005 09:54:24 +0000 (09:54 +0000)
src/VISUGUI/VisuGUI_TimeAnimation.cxx

index 1bae73cc5b17319169c07763503abd578a1870f3..cc6392846bdc88aff234469a342d088ef9aeacaf 100644 (file)
@@ -832,15 +832,14 @@ static QPixmap MYpausePixmap(pauseIco);
 
 VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Study) theStudy)
      : QDialog(VISU::GetDesktop(theModule), "VisuGUI_TimeAnimationDlg", false, WStyle_Customize |
-               WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose)
+               WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
+       myModule(theModule),
+       myStudy(theStudy)
 {
   setCaption("Animation");
   setSizeGripEnabled( TRUE );
-  myModule = theModule;
-  myStudy = theStudy;
   isClosing = false;
 
-  //myAnimator = new VISU_TimeAnimation (VISU::GetDSStudy(theStudy));
   myAnimator = new VISU_TimeAnimation (theStudy);
   myAnimator->setSpeed(1);
   myAnimator->setViewer(VISU::GetViewWindow());
@@ -997,6 +996,9 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_CLOSE"), aBtnBox);
   connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(close()));
 
+  SUIT_Study* aStudy = VISU::GetAppStudy(myModule);
+  connect(aStudy, SIGNAL(destroyed()), this, SLOT(close()));
+
   aMainLayout->addWidget(aBtnBox);
 
   myPlayFrame->setEnabled(false);