From 1275c86ccc33a5dce6babe0f04ab8893b12a4f16 Mon Sep 17 00:00:00 2001 From: ana Date: Fri, 29 Mar 2013 10:27:29 +0000 Subject: [PATCH] Fix for the "0051858: TC7.2.0 show-hide commands in VTK viewer don't work" issue --- src/SVTK/SVTK_ViewModel.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index 363e95ab1..615316342 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -33,6 +33,7 @@ #include "SVTK_ViewModel.h" #include "SVTK_ViewWindow.h" #include "SVTK_View.h" +#include "SVTK_Renderer.h" //#include "SVTK_MainWindow.h" #include "SVTK_Prs.h" @@ -665,8 +666,9 @@ void SVTK_Viewer::EraseAll( const bool forced ) //Handle(SALOME_InteractiveObject) anObj = anAct->getIO(); //if(!anObj.IsNull() && anObj->hasEntry() && aStudy) // ToolsGUI::SetVisibility(aStudy,anObj->getEntry(),false,this); - if(forced) - aRenderer->RemoveActor(anAct); + if(forced) + if(SVTK_Renderer* aRnd = aView->GetRenderer()) + aRnd->RemoveActor(anAct); else{ // just erase actor anAct->SetVisibility( false ); -- 2.39.2