]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Disable global VTK warning window 97/4197/1
authorReino Ruusu <reino.ruusu@semantum.fi>
Tue, 28 Apr 2020 13:21:15 +0000 (16:21 +0300)
committerReino Ruusu <reino.ruusu@semantum.fi>
Tue, 28 Apr 2020 13:21:15 +0000 (16:21 +0300)
gitlab #124

Change-Id: I088e823aa6da2c984dc76bb41fecac4289e90225

org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java
org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java

index 09e88ae6534fd86de33a0a4ef9294103fcf09313..9ede257ed5cf3436bbc1ad6157bd648dd84cd5d1 100644 (file)
@@ -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();
index 03d0d2fb8cde95f7f6e16f943119fb8dcdb1fba3..aaa2091699a01a56989d78931813589ce4ddc41f 100644 (file)
@@ -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;