VISU::View3D_i* pView = dynamic_cast<VISU::View3D_i*>(GetServant(theView3D).in());
SUIT_ViewWindow* aVW = pView->GetViewWindow();
myView = VISU::GetViewWindow(aVW);
+ connect( myView, SIGNAL( destroyed() ), this, SLOT( onViewDeleted() ) );
}
myMaxVal = 0;
//************************************************************************
void VISU_TimeAnimation::clearData(FieldData& theData) {
+ if( !myView )
+ return;
+
theData.myTiming.clear();
vtkRenderer* aRen = myView->getRenderer();
if (!theData.myActors.empty()) {
//************************************************************************
void VISU_TimeAnimation::nextFrame() {
+ if( !myView )
+ return;
+
stopAnimation();
if (myFrame < (myFieldsLst[0].myNbFrames-1)) {
int i;
//************************************************************************
void VISU_TimeAnimation::prevFrame() {
+ if( !myView )
+ return;
stopAnimation();
if (myFrame > 0) {
int i;
//************************************************************************
void VISU_TimeAnimation::firstFrame() {
+ if( !myView )
+ return;
+
stopAnimation();
int i;
for (i = 0; i < getNbFields(); i++)
//************************************************************************
void VISU_TimeAnimation::lastFrame() {
+ if( !myView )
+ return;
+
stopAnimation();
int i;
for (i = 0; i < getNbFields(); i++)
//************************************************************************
// For Batchmode using
void VISU_TimeAnimation::gotoFrame(CORBA::Long theFrame) {
- if ((theFrame < 0) || (theFrame > (getNbFrames()-1)))
+ if ((theFrame < 0) || (theFrame > (getNbFrames()-1)) || !myView )
return;
stopAnimation();
qApp->lock();
myAnimEntry = aStr.c_str();
}
+void VISU_TimeAnimation::onViewDeleted()
+{
+ myView = 0;
+}
+
//========================================================================
//========================================================================