From 57aed4275123f2c0751684acf344d768a107ab2c Mon Sep 17 00:00:00 2001 From: Reino Ruusu Date: Tue, 28 Apr 2020 16:21:15 +0300 Subject: [PATCH] Disable global VTK warning window gitlab #124 Change-Id: I088e823aa6da2c984dc76bb41fecac4289e90225 (cherry picked from commit 81ca5113f19b62068146806f05e2e99bbe14b5f8) --- .../src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java | 5 +++++ .../org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java index 09e88ae6..9ede257e 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java @@ -29,6 +29,7 @@ import vtk.vtkAssemblyPath; import vtk.vtkCellPicker; import vtk.vtkGenericRenderWindowInteractor; import vtk.vtkInteractorStyleTrackballCamera; +import vtk.vtkObject; import vtk.vtkObjectBase; import vtk.vtkPanel; import vtk.vtkPointPicker; @@ -52,6 +53,10 @@ public class InteractiveVtkPanel extends vtkPanel implements VtkView { public InteractiveVtkPanel() { super(); + + // This is actually a static method in C++ + new vtkObject().GlobalWarningDisplayOff(); + iren = new vtkGenericRenderWindowInteractor(); iren.SetRenderWindow(rw); iren.TimerEventResetsTimerOff(); diff --git a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java index 03d0d2fb..aaa20916 100644 --- a/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java +++ b/org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java @@ -18,6 +18,7 @@ import vtk.vtkAreaPicker; import vtk.vtkAssemblyNode; import vtk.vtkAssemblyPath; import vtk.vtkCellPicker; +import vtk.vtkObject; import vtk.vtkObjectBase; import vtk.vtkPointPicker; import vtk.vtkProp; @@ -35,8 +36,9 @@ public class InteractiveVtkComposite extends vtkSwtComponent implements VtkView{ public InteractiveVtkComposite(Composite parentComposite) { super(parentComposite); this.parentComposite = parentComposite; - - // TODO Auto-generated constructor stub + + // This is actually a static method in C++ + new vtkObject().GlobalWarningDisplayOff(); } private boolean updating = false; -- 2.45.2