]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for the "0051858: TC7.2.0 show-hide commands in VTK viewer don't work" issue
authorana <ana@opencascade.com>
Fri, 29 Mar 2013 10:27:29 +0000 (10:27 +0000)
committerana <ana@opencascade.com>
Fri, 29 Mar 2013 10:27:29 +0000 (10:27 +0000)
src/SVTK/SVTK_ViewModel.cxx

index 363e95ab1ca0fa8bb709e063594b34a5e2fbf992..61531634220eb8f7971e638cf7538344dc43e43c 100644 (file)
@@ -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 );