]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
All modules must use SVTK package instead VTK
authorasl <asl@opencascade.com>
Wed, 5 Oct 2005 06:30:13 +0000 (06:30 +0000)
committerasl <asl@opencascade.com>
Wed, 5 Oct 2005 06:30:13 +0000 (06:30 +0000)
src/VISUGUI/VisuGUI_Tools.cxx

index cf7103a1022a2f8bd512191c6e361e9e519252fb..030fdd0677e4ea2bcadc047c07b92a6ebc4a979d 100644 (file)
@@ -462,9 +462,11 @@ namespace VISU
   ChangeRepresentation (const SalomeApp_Module* theModule,
                         VISU::PresentationType  theType)
   {
-    SUIT_ViewWindow* aView = GetActiveView(theModule, VTKViewer_Viewer::Type());
+    SUIT_ViewWindow* aView = GetActiveView(theModule, SVTK_Viewer::Type());
     if (!aView) return;
-    SVTK_ViewWindow* vw  = (SVTK_ViewWindow*) aView;
+    SVTK_ViewWindow* vw  = dynamic_cast<SVTK_ViewWindow*>( aView );
+    if( !vw )
+      return;
 
     Handle(SALOME_InteractiveObject) anIO;
     CORBA::Object_var anObject = GetSelectedObj(theModule, &anIO);