From 97820a19f628447c9630476db99cbead55e36428 Mon Sep 17 00:00:00 2001 From: abd Date: Fri, 3 Nov 2006 15:19:34 +0000 Subject: [PATCH] Disable vtk warnings --- src/VTKViewer/VTKViewer_ViewModel.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) 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(), -- 2.39.2