VisuGUI::
OnTimeAnimation()
{
+ if(!VISU::GetViewWindow())
+ return;
+
_PTR(Study) aCStudy = GetCStudy(GetAppStudy(this));
VisuGUI_TimeAnimationDlg* aAnimationDlg =
-// new VisuGUI_TimeAnimationDlg(GetDesktop(this), aCStudy);
new VisuGUI_TimeAnimationDlg (this, aCStudy);
SalomeApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
VisuGUI::
OnShowAnimation()
{
+ if(!VISU::GetViewWindow())
+ return;
+
SalomeApp_SelectionMgr* aSelectionMgr = GetSelectionMgr(this);
SALOME_ListIO aListIO;
aSelectionMgr->selectedObjects(aListIO);
aRule = "client='VTKViewer' and selcount=1" + aInsideType;
mgr->setRule( action( VISU_SELECTION_INFO ), aRule, true );
- aRule = "client='ObjectBrowser' and selcount>0 and $type in {'VISU::TFIELD'} and nbTimeStamps>1";
+ aRule = "client='ObjectBrowser' and selcount>0 and $type in {'VISU::TFIELD'} and nbTimeStamps>1 and activeView='VTKViewer'";
mgr->setRule( action( VISU_ANIMATION ), aRule, true );
aRule = "client='ObjectBrowser' and $type in {'VISU::TENTITY' 'VISU::TFAMILY' 'VISU::TGROUP'}";
//************************************************************************
void VISU_TimeAnimation::clearData(FieldData& theData) {
+ if (!myView) {
+ MESSAGE("Viewer is not defined for animation");
+ return;
+ }
theData.myTiming.clear();
vtkRenderer* aRen = myView->getRenderer();
if (!theData.myActors.empty()) {
//************************************************************************
void VISU_TimeAnimation::nextFrame() {
+ if (!myView) {
+ MESSAGE("Viewer is not defined for animation");
+ return;
+ }
stopAnimation();
if (myFrame < (myFieldsLst[0].myNbFrames-1)) {
int i;
//************************************************************************
void VISU_TimeAnimation::prevFrame() {
+ if (!myView) {
+ MESSAGE("Viewer is not defined for animation");
+ return;
+ }
stopAnimation();
if (myFrame > 0) {
int i;
//************************************************************************
void VISU_TimeAnimation::firstFrame() {
+ if (!myView) {
+ MESSAGE("Viewer is not defined for animation");
+ return;
+ }
stopAnimation();
int i;
for (i = 0; i < getNbFields(); i++)
//************************************************************************
void VISU_TimeAnimation::lastFrame() {
+ if (!myView) {
+ MESSAGE("Viewer is not defined for animation");
+ return;
+ }
stopAnimation();
int i;
for (i = 0; i < getNbFields(); i++)
//************************************************************************
// For Batchmode using
void VISU_TimeAnimation::gotoFrame(CORBA::Long theFrame) {
+ if (!myView) {
+ MESSAGE("Viewer is not defined for animation");
+ return;
+ }
if ((theFrame < 0) || (theFrame > (getNbFrames()-1)))
return;
stopAnimation();