From: abd Date: Fri, 3 Nov 2006 15:19:34 +0000 (+0000) Subject: Disable vtk warnings X-Git-Tag: For_HDF~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=97820a19f628447c9630476db99cbead55e36428;p=modules%2Fgui.git Disable vtk warnings --- diff --git a/src/VTKViewer/VTKViewer_ViewModel.cxx b/src/VTKViewer/VTKViewer_ViewModel.cxx index 9653aeacf..f611972ae 100755 --- a/src/VTKViewer/VTKViewer_ViewModel.cxx +++ b/src/VTKViewer/VTKViewer_ViewModel.cxx @@ -31,6 +31,17 @@ #include #include +bool _InitializeVtkWarningsCall() +{ + char* isOn = getenv( "VTK_WARNINGS_IS_ON" ); + if ( !isOn || strcmp( isOn, "1" ) ) + vtkObject::GlobalWarningDisplayOff(); + + delete isOn; + return vtkObject::GetGlobalWarningDisplay(); +} +static bool _InitializeVtkWarnings = _InitializeVtkWarningsCall(); + /*!Constructor.Sets background color to black.*/ VTKViewer_Viewer::VTKViewer_Viewer() : SUIT_ViewModel(),