From 4846215141254453d0e2bd6b88b7d8b8dfa62b5f Mon Sep 17 00:00:00 2001 From: smh Date: Thu, 6 May 2004 14:30:15 +0000 Subject: [PATCH] VISU::VISU_Gen::ShowTestObject() crashed if default view type was different from VTK --- src/VISU_I/VISU_ViewManager_i.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/VISU_I/VISU_ViewManager_i.cc b/src/VISU_I/VISU_ViewManager_i.cc index 65d7d1af..1ec6ddfb 100644 --- a/src/VISU_I/VISU_ViewManager_i.cc +++ b/src/VISU_I/VISU_ViewManager_i.cc @@ -1378,7 +1378,10 @@ namespace VISU{ QAD_Study* aStudy = desktop->getActiveStudy(); if ( !aStudy ) return ; - VTKViewer_ViewFrame* vf = (VTKViewer_ViewFrame*)(desktop->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame()); + QAD_StudyFrame* sf = desktop->getActiveStudy()->getActiveStudyFrame(); + VTKViewer_ViewFrame* vf = GetViewFrame( sf ); + if ( !vf ) + return; sphere->SetVisibility( true ); vf->getRenderer()->AddActor(sphere); vf->Repaint(); -- 2.39.2