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);