From d68cb8ecb8dc3ba9c1cd3437b356fa06a96d3d0b Mon Sep 17 00:00:00 2001 From: apo Date: Wed, 10 May 2006 11:16:58 +0000 Subject: [PATCH] Fix for Bug12371 No "Erase all" in the Gauss Viewer (MKO) --- src/VISUGUI/VisuGUI_Module.cxx | 68 ++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 228c24d9..5899b7e4 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -82,6 +82,38 @@ #include "VVTK_MainWindow.h" #include "VISU_View_i.hh" +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + #include + #include +#else + #include +#endif + #include +#endif +#ifndef DISABLE_OCCVIEWER + #include + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif +#endif +#ifndef DISABLE_GLVIEWER + #include + #include +#endif +#ifndef DISABLE_PLOT2DVIEWER + #include + #include +#ifndef DISABLE_SALOMEOBJECT + #include +#else + #include +#endif +#endif + #include #include @@ -259,6 +291,42 @@ initialize( CAM_Application* theApp ) true ); action( GAUSS_COPY_PRS )->setEnabled(false); + QStringList viewers; + +#ifndef DISABLE_OCCVIEWER +#ifndef DISABLE_SALOMEOBJECT + viewers.append( SOCC_Viewer::Type() ); +#else + viewers.append( OCCViewer_Viewer::Type() ); +#endif +#endif +#ifndef DISABLE_VTKVIEWER +#ifndef DISABLE_SALOMEOBJECT + viewers.append( SVTK_Viewer::Type() ); + viewers.append( VVTK_Viewer::Type() ); +#else + viewers.append( VTKViewer_Viewer::Type() ); +#endif +#endif +#ifndef DISABLE_PLOT2DVIEWER +#ifndef DISABLE_SALOMEOBJECT + viewers.append( SPlot2d_Viewer::Type() ); +#else + viewers.append( Plot2d_Viewer::Type() ); +#endif +#endif + + if( !viewers.isEmpty() ) + { + QString strViewers = "{ ", temp = "'%1' "; + QStringList::const_iterator anIt = viewers.begin(), aLast = viewers.end(); + for( ; anIt!=aLast; anIt++ ) + strViewers+=temp.arg( *anIt ); + strViewers+="}"; + mgr->setRule( action(myEraseAll), QString( "client in %1" ).arg( strViewers ), true ); + cout<<"strViewers - "<