]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
NPAL14845: EDF358: Animation: Salome freeze when closing window.
authorjfa <jfa@opencascade.com>
Thu, 15 Feb 2007 09:16:05 +0000 (09:16 +0000)
committerjfa <jfa@opencascade.com>
Thu, 15 Feb 2007 09:16:05 +0000 (09:16 +0000)
src/VISUGUI/VisuGUI_TimeAnimation.cxx
src/VISUGUI/VisuGUI_TimeAnimation.h
src/VISU_I/VISU_TimeAnimation.cxx
src/VISU_I/VISU_TimeAnimation.h

index 60db3ea32d26f81215842022ce13cd2b39ce2d8a..5bbf1f847a723680368cce65a7b42763b3f52f6f 100644 (file)
@@ -1063,7 +1063,6 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
          false, 
          WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose),
   myModule(theModule),
-  myStudy(theStudy),
   mySetupDlg(NULL)
 {
   if ( theMode == 0 )
@@ -1071,8 +1070,6 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   else if ( theMode == 1 )
     setCaption(tr("SUCCESSIVE_ANIMATION"));
   setSizeGripEnabled( TRUE );
-  isClosing = false;
-  myCloseBtnClicked = false;
 
   myAnimator = new VISU_TimeAnimation (theStudy);
   myAnimator->setViewer(VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule));
@@ -1288,7 +1285,7 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
   aBtnLayout->addStretch();
 
   QPushButton* aCloseBtn = new QPushButton(tr("BUT_CLOSE"), aBtnBox);
-  connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(onClose()));
+  connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(close()));
 
   QPushButton* aHelpBtn = new QPushButton(tr("BUT_HELP"), aBtnBox);
   connect(aHelpBtn, SIGNAL(clicked()), this, SLOT(onHelp()));
@@ -1307,7 +1304,7 @@ VisuGUI_TimeAnimationDlg::VisuGUI_TimeAnimationDlg (VisuGUI* theModule, _PTR(Stu
 //------------------------------------------------------------------------
 VisuGUI_TimeAnimationDlg::~VisuGUI_TimeAnimationDlg()
 {
-  if(myAnimator != NULL){
+  if (myAnimator != NULL) {
     delete myAnimator;
     myAnimator = NULL;
     if ( VISU::GetActiveViewWindow<SVTK_ViewWindow>(myModule) )
@@ -1428,35 +1425,16 @@ void VisuGUI_TimeAnimationDlg::showEvent(QShowEvent* theEvent)
   mySetupDlg = new SetupDlg(this,myModule, myAnimator);
 }
 
-void VisuGUI_TimeAnimationDlg::reject()
-{
-  close();
-  QDialog::reject();
-}
-
-void VisuGUI_TimeAnimationDlg::onClose()
-{
-  myCloseBtnClicked = true;
-  close();
-}
-
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::closeEvent (QCloseEvent* theEvent)
 {
-  if(myAnimator != NULL){
+  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 && !myCloseBtnClicked){
-       for (int i = 0; (myAnimator != NULL) && (i < myAnimator->getNbFields()); i++)
-         myAnimator->clearData(myAnimator->getFieldData(i));
-       myAnimator->clearFieldData();
-      }
+      theEvent->ignore();
+      QCloseEvent* aNewCloseEvent = new QCloseEvent;
+      QApplication::postEvent( this, aNewCloseEvent );
     } else {
       QDialog::closeEvent(theEvent);
     }
@@ -1565,14 +1543,10 @@ void VisuGUI_TimeAnimationDlg::onCheckDump(bool)
 //------------------------------------------------------------------------
 void VisuGUI_TimeAnimationDlg::onStop()
 {
-  if (isClosing) {
-    QDialog::closeEvent(myEvent);
-  } else {
-    myPlayBtn->setOn(false);
-    myPlayBtn->setIconSet(MYplayPixmap);
-    mySetupBtn->setEnabled(true);
-    myGenBtn->setEnabled(true);
-  }
+  myPlayBtn->setOn(false);
+  myPlayBtn->setIconSet(MYplayPixmap);
+  mySetupBtn->setEnabled(true);
+  myGenBtn->setEnabled(true);
 }
 
 //------------------------------------------------------------------------
@@ -1585,7 +1559,8 @@ void VisuGUI_TimeAnimationDlg::onHelp()
   else {
     SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
                           QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
-                          arg(app->resourceMgr()->stringValue("ExternalBrowser", "application")).arg(aHelpFileName),
+                          arg(app->resourceMgr()->stringValue
+                               ("ExternalBrowser", "application")).arg(aHelpFileName),
                           QObject::tr("BUT_OK"));
   }
 }
@@ -1640,4 +1615,3 @@ void VisuGUI_TimeAnimationDlg::keyPressEvent( QKeyEvent* e )
       onHelp();
     }
 }
-
index f717b3f68c7550edb66c9a037e8a3ea233328c9f..21d8f47130a2ab33edb99c9a025c97bcb30244e6 100644 (file)
@@ -155,7 +155,6 @@ class VisuGUI_TimeAnimationDlg: public QDialog
     virtual void closeEvent(QCloseEvent* theEvent);
     virtual void showEvent(QShowEvent* theEvent);
     virtual void keyPressEvent(QKeyEvent* theEvent);
-    virtual void reject();
     void stopAnimation();
     
  private slots:
@@ -181,9 +180,13 @@ class VisuGUI_TimeAnimationDlg: public QDialog
    void onPicsFormatChanged();
    /*!Sets path for myAnimator (dumpTo(...)), from myPathEdit.*/
    void onPathChanged();
-   void onClose();
 
  private:
+    // Data
+    VisuGUI* myModule;
+    VISU_TimeAnimation* myAnimator;
+
+    // widgets
     QSlider* mySlider;
     QComboBox* myTypeCombo;
     QPushButton* myPropBtn;
@@ -194,16 +197,10 @@ class VisuGUI_TimeAnimationDlg: public QDialog
 
     QFrame* myPlayFrame;
     SetupDlg* mySetupDlg;
-    _PTR(Study) myStudy;
-    VisuGUI* myModule;
 
-    VISU_TimeAnimation* myAnimator;
     QCheckBox* mySaveCheck;
     QComboBox* myPicsFormat;
     QLineEdit* myPathEdit;
-    bool isClosing;
-    bool myCloseBtnClicked;
-    QCloseEvent* myEvent;
 
     QCheckBox* mySaveAVICheck;
     QLineEdit* myPathAVIEdit;
index a478f55ee7d9ba4e2728d44e7df3928549fc349b..574c940be628a37a986f27d21eb6bb016d810669 100644 (file)
 
 using namespace std;
 
+namespace VISU {
+  class ExecutionState {
+    bool myIsActive;
+    QMutex myIsActiveMutex;
+  public:
+    ExecutionState(bool isActive = false)
+      : myIsActive(isActive) {}
+
+    bool IsActive() {
+      bool state;
+      myIsActiveMutex.lock();
+      state = myIsActive;
+      myIsActiveMutex.unlock();
+      return state;
+    }
+    bool SetActive(bool isActive) {
+      bool state;
+      myIsActiveMutex.lock();
+      state = myIsActive;
+      myIsActive = isActive;
+      myIsActiveMutex.unlock();
+      return state;
+    }
+  };
+}
 
 //------------------------------------------------------------------------
 VISU_TimeAnimation::VISU_TimeAnimation (_PTR(Study) theStudy,
                                         VISU::View3D_ptr theView3D)
 {
   myStudy = theStudy;
-  myIsActive = false;
+  myExecutionState = new VISU::ExecutionState(false);
   myFrame = 0;
   mySpeed = VISU::GetResourceMgr()->integerValue("VISU", "speed", 1);
   myProportional = VISU::GetResourceMgr()->booleanValue("VISU", "use_proportional_timing", false);
@@ -120,10 +145,24 @@ VISU_TimeAnimation::~VISU_TimeAnimation()
     return;
   }
 
+  if (QThread::running() && !QThread::finished()) {
+    //myExecutionState->SetActive(false);
+    stopAnimation();
+    QThread::wait(500);
+    if (QThread::running() && !QThread::finished()) {
+      QThread::terminate();
+    }
+  }
+
   for (int i = 0; i < getNbFields(); i++) {
     clearData(myFieldsLst[i]);
   }
   clearFieldData();
+
+  delete myExecutionState;
+
+  myDumpPath = "";
+
   /* Terminates the execution of the thread. 
    * The thread may or may not be terminated immediately, 
    * depending on the operating system's scheduling policies. 
@@ -138,10 +177,9 @@ VISU_TimeAnimation::~VISU_TimeAnimation()
    * There is no chance for the thread to cleanup after itself, 
    * unlock any held mutexes, etc. In short, use this function only if absolutely necessary. 
    */
-  myDumpPath = "";
-  QThread::wait(100);
-  QThread::terminate();
-  QThread::wait(400);
+  //QThread::wait(100);
+  //QThread::terminate();
+  //QThread::wait(400);
 }
 
 
@@ -623,22 +661,16 @@ void VISU_TimeAnimation::visibilityOff(int num_field, int num_frame)
                    (this,&VISU_TimeAnimation::_visibilityOff,num_field,num_frame));
 }
 
-//------------------------------------------------------------------------
-void VISU_TimeAnimation::_stopAnimation() {
-  myIsActive = false;
-}
-
 //------------------------------------------------------------------------
 void VISU_TimeAnimation::stopAnimation()
 {
-  ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>
-                   (this,&VISU_TimeAnimation::_stopAnimation));
+  myExecutionState->SetActive(false);
 }
 
 //------------------------------------------------------------------------
 void VISU_TimeAnimation::_startAnimation() {
-  if (!myIsActive) {
-    myIsActive = true;
+  if (!myExecutionState->IsActive()) {
+    myExecutionState->SetActive(true);
     QThread::start();
   }
 }
@@ -650,6 +682,11 @@ void VISU_TimeAnimation::startAnimation()
                    (this,&VISU_TimeAnimation::_startAnimation));
 }
 
+//------------------------------------------------------------------------
+CORBA::Boolean VISU_TimeAnimation::isRunning()
+{
+  return myExecutionState->IsActive();
+}
 
 //------------------------------------------------------------------------
 void VISU_TimeAnimation::_nextFrame() {
@@ -1014,31 +1051,33 @@ void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QValueList<int>&
   if (myFieldsLst[0].myNbFrames > 2)
     aOneVal = ( myTimeMax - myTimeMin ) / getNbFrames();
   int aNbFiles = 0;
-  
-  while (myIsActive) {
-    ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
-                                                                             myFrame, myFieldsLst[0].myTiming[myFrame]));
-    if (myIsActive) {
-    if(!(myFieldsLst[0].myField))
-      break;
-    for (int i = 0; i < getNbFields(); i++) {
-      FieldData& aData = myFieldsLst[i];
-      if (myFrame > 0) {
-       if (aData.myActors[myFrame-1] != 0)
-         visibilityOff(i, myFrame-1);
-      } else {
-       if (aData.myActors[aData.myNbFrames-1] != 0)
-         visibilityOff(i, aData.myNbFrames-1);
-      }
-      if (aData.myActors[myFrame] != 0) {
-       ProcessVoidEvent(new TVoidMemFunEvent<VISU_Actor>(aData.myActors[myFrame],
-                                                         &VISU_Actor::VisibilityOn));
+
+  bool hasHextFrame = true;
+  while (hasHextFrame && myExecutionState->IsActive()) {
+    ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>
+                     (this, &VISU_TimeAnimation::_emitFrameChanged,
+                      myFrame, myFieldsLst[0].myTiming[myFrame]));
+    if (myExecutionState->IsActive()) {
+      if (!(myFieldsLst[0].myField))
+        break;
+      for (int i = 0; i < getNbFields(); i++) {
+        FieldData& aData = myFieldsLst[i];
+        if (myFrame > 0) {
+          if (aData.myActors[myFrame-1] != 0)
+            visibilityOff(i, myFrame-1);
+        } else {
+          if (aData.myActors[aData.myNbFrames-1] != 0)
+            visibilityOff(i, aData.myNbFrames-1);
+        }
+        if (aData.myActors[myFrame] != 0) {
+          ProcessVoidEvent(new TVoidMemFunEvent<VISU_Actor>(aData.myActors[myFrame],
+                                                            &VISU_Actor::VisibilityOn));
+        }
       }
-    }
-    bool repainArg = false;
-    ProcessVoidEvent(new TVoidMemFun1ArgEvent<SVTK_ViewWindow,bool>(myView,
-                                                                   &SVTK_ViewWindow::Repaint,
-                                                                   repainArg));
+      bool repainArg = false;
+      ProcessVoidEvent(new TVoidMemFun1ArgEvent<SVTK_ViewWindow,bool>(myView,
+                                                                      &SVTK_ViewWindow::Repaint,
+                                                                      repainArg));
     }
 
     k = 1;
@@ -1064,44 +1103,39 @@ void VISU_TimeAnimation::parallelAnimation( bool& theIsDumping, QValueList<int>&
       delay = 1;
     }
     msleep(delay);
-    if (!myIsActive) {
-      ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
-      return;
-    }
+    if (!myExecutionState->IsActive()) return;
 
     if (theIsDumping) {
       // We must unlock mutex for some time before grabbing to allow view updating
       msleep(delay);
-      if (!myIsActive) { // this check was taken from WP_DEB branch
-       ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
-       return;
-      }
-      if(!(myFieldsLst[0].myField)) // break, if field was deleted.
+      if (!myExecutionState->IsActive()) return;
+
+      if (!(myFieldsLst[0].myField)) // break, if field was deleted.
        break;
+
       saveImages( 0, aOneVal, aNbFiles, theIndexList );
     }
 
-    if (!myIsActive) break;
+    if (!myExecutionState->IsActive()) break;
 
     myFrame++;
     if (myFrame == myFieldsLst[0].myNbFrames) {
       if (!myCycling) {
-       myIsActive = false;
+        hasHextFrame = false;
        myFrame--;
-       break;
-      else
+      }
+      else
        myFrame = 0;
     }
-  }
+  } // while (hasHextFrame && myExecutionState->IsActive())
 }
 
 //------------------------------------------------------------------------
 void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList<int>& theIndexList )
 {
-  if ( myFrame >= getNbFrames() - 1 )
+  if (myFrame >= getNbFrames() - 1)
   {
-    myIsActive = false;
-    ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
+    myExecutionState->SetActive(false);
     return;
   }
 
@@ -1112,40 +1146,46 @@ void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList<in
   int aNbFiles = 0;
   long aFrame = myFrame;
 
-  while (myIsActive) {
-
-    for (int aFieldId = 0; (aFieldId < getNbFields()) && (myFieldsLst[aFieldId].myField); aFieldId++) {
+  bool hasHextFrame = true;
+  while (hasHextFrame && myExecutionState->IsActive())
+  {
+    for (int aFieldId = 0;
+         (aFieldId < getNbFields()) && (myFieldsLst[aFieldId].myField);
+         aFieldId++, aFrame = 0)
+    {
+      if (!myExecutionState->IsActive()) break;
 
       FieldData& aData = myFieldsLst[aFieldId];
       if ( !aData.myPrs[0] ) continue;
-      while (aFrame < aData.myNbFrames) {
-      
-       ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>(this, &VISU_TimeAnimation::_emitFrameChanged,
-                                                                                 myFrame, myFieldsLst[aFieldId].myTiming[aFrame]));
-    
-       if (myIsActive) {
-       if (aFrame > 0) {
-         if (aData.myActors[aFrame-1] != 0)
-           visibilityOff(aFieldId, aFrame-1);
-       } else if ( myFrame > 0) {
-         if (myFieldsLst[aFieldId-1].myActors[myFieldsLst[aFieldId-1].myNbFrames-1] != 0)
-           visibilityOff(aFieldId-1, myFieldsLst[aFieldId-1].myNbFrames-1);
-       } else if ( myCycling ) {
-         if (myFieldsLst[getNbFields()-1].myActors[myFieldsLst[getNbFields()-1].myNbFrames-1] != 0)
-           visibilityOff(getNbFields()-1, myFieldsLst[getNbFields()-1].myNbFrames-1);
-       } else {
-         if (aData.myActors[aData.myNbFrames-1] != 0)
-           visibilityOff(aFieldId, aData.myNbFrames-1);
-       }
-       if (aData.myActors[aFrame] != 0) {
-         ProcessVoidEvent(new TVoidMemFunEvent<VISU_Actor>(aData.myActors[aFrame],
-                                                           &VISU_Actor::VisibilityOn));
-       }
+      for (; aFrame < aData.myNbFrames && myExecutionState->IsActive(); aFrame++, myFrame++)
+      {
+       ProcessVoidEvent(new TVoidMemFun2ArgEvent<VISU_TimeAnimation,long,double>
+                         (this, &VISU_TimeAnimation::_emitFrameChanged,
+                          myFrame, myFieldsLst[aFieldId].myTiming[aFrame]));
+
+       if (myExecutionState->IsActive()) {
+          if (aFrame > 0) {
+            if (aData.myActors[aFrame-1] != 0)
+              visibilityOff(aFieldId, aFrame-1);
+          } else if ( myFrame > 0) {
+            if (myFieldsLst[aFieldId-1].myActors[myFieldsLst[aFieldId-1].myNbFrames-1] != 0)
+              visibilityOff(aFieldId-1, myFieldsLst[aFieldId-1].myNbFrames-1);
+          } else if ( myCycling ) {
+            if (myFieldsLst[getNbFields()-1].myActors[myFieldsLst[getNbFields()-1].myNbFrames-1] != 0)
+              visibilityOff(getNbFields()-1, myFieldsLst[getNbFields()-1].myNbFrames-1);
+          } else {
+            if (aData.myActors[aData.myNbFrames-1] != 0)
+              visibilityOff(aFieldId, aData.myNbFrames-1);
+          }
+          if (aData.myActors[aFrame] != 0) {
+            ProcessVoidEvent(new TVoidMemFunEvent<VISU_Actor>(aData.myActors[aFrame],
+                                                              &VISU_Actor::VisibilityOn));
+          }
 
-       bool repainArg = false;
-       ProcessVoidEvent(new TVoidMemFun1ArgEvent<SVTK_ViewWindow,bool>(myView,
-                                                                       &SVTK_ViewWindow::Repaint,
-                                                                       repainArg));
+          bool repainArg = false;
+          ProcessVoidEvent(new TVoidMemFun1ArgEvent<SVTK_ViewWindow,bool>(myView,
+                                                                          &SVTK_ViewWindow::Repaint,
+                                                                          repainArg));
        }
 
        k = 1;
@@ -1171,44 +1211,31 @@ void VISU_TimeAnimation::succcessiveAnimation( bool& theIsDumping, QValueList<in
          delay = 1;
        }
        msleep(delay);
-       if (!myIsActive) {
-         ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
-         return;
-       }
+
+       if (!myExecutionState->IsActive()) return;
 
        if (theIsDumping) {
          // We must unlock mutex for some time before grabbing to allow view updating
          msleep(delay);
-         if (!myIsActive) { // this check was taken from WP_DEB branch
-           ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
-           return;
-         }
+         if (!myExecutionState->IsActive()) return;
 
-         if(!(myFieldsLst[aFieldId].myField)) // break, if field was deleted.
+         if (!(myFieldsLst[aFieldId].myField)) // break, if field was deleted.
            break;
 
          saveImages( aFieldId, aOneVal, aNbFiles, theIndexList );
        }
-       
-       if (!myIsActive) break;
-       
-       aFrame++;
-       myFrame++;
-      }
-
-      aFrame = 0;
-    }
+      } // for (; aFrame < aData.myNbFrames && myExecutionState->IsActive(); aFrame++, myFrame++)
+    } // for (int aFieldId = 0;
 
     if (!myCycling) {
-      myIsActive = false;
+      hasHextFrame = false;
       myFrame--;
-      break;
-    else {
+    }
+    else {
       myFrame = 0;
       aFrame = myFrame;
     }
-  }
-
+  } // while (hasHextFrame && myExecutionState->IsActive())
 }
 
 //------------------------------------------------------------------------
@@ -1297,7 +1324,7 @@ void VISU_TimeAnimation::run()
     succcessiveAnimation( isDumping, anIndexList );
 
   // make AVI file if need
-  if (isDumping && myDumpFormat.compare("AVI") == 0) {
+  if (isDumping && myDumpFormat.compare("AVI") == 0 && myExecutionState->IsActive()) {
     double aFPS = 17.3 * mySpeed;
 
     QFileInfo aFileInfo(myDumpPath);
@@ -1347,8 +1374,9 @@ void VISU_TimeAnimation::run()
     system(aCmd.latin1());
   }
 
-  ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
-  QThread::exit();
+  if (myExecutionState->IsActive())
+    ProcessVoidEvent(new TVoidMemFunEvent<VISU_TimeAnimation>(this,&VISU_TimeAnimation::_emitStopped));
+  myExecutionState->SetActive(false);
 }
 
 //------------------------------------------------------------------------
index b0062a3c5793a803b3db469eb39a83aa38a34ad8..4f359c67bd73266b3b76b9e94413722d52d1f1e4 100644 (file)
@@ -39,6 +39,7 @@ namespace VISU
 {
   class Result_i;
   class ColoredPrs3d_i;
+  class ExecutionState;
 }
 
 struct FieldData
@@ -63,7 +64,6 @@ class VISU_TimeAnimation: public QObject, public QThread
   void _visibilityOff(int num_field, int num_frame);
   void _clearView();
   void _clearData(FieldData& theData);
-  void _stopAnimation();
   void _startAnimation();
   void _nextFrame();
   void _prevFrame();
@@ -116,7 +116,7 @@ class VISU_TimeAnimation: public QObject, public QThread
 
   CORBA::Long getNbFields() { return myFieldsLst.size(); }
   CORBA::Long getNbFrames();
-  CORBA::Boolean isRunning() { return myIsActive; }
+  CORBA::Boolean isRunning();
   CORBA::Long getCurrentFrame() { return myFrame; }
 
   long getAbsoluteFrameNumber(std::pair<int,long> theFieldTimeStamp);
@@ -188,7 +188,7 @@ class VISU_TimeAnimation: public QObject, public QThread
   QString myLastError;
 
   QValueList<FieldData> myFieldsLst;
-  bool myIsActive;
+  VISU::ExecutionState* myExecutionState;
   long myFrame;
   std::vector<long> myFieldsAbsFrames;
   int mySpeed;