]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java
Only disable warning display when not in development mode
[simantics/3d.git] / org.simantics.g3d.vtk / src / org / simantics / g3d / vtk / swt / InteractiveVtkComposite.java
index 03d0d2fb8cde95f7f6e16f943119fb8dcdb1fba3..540e300aa2cde241b6cc464a5dcd4d091b5bdcf3 100644 (file)
@@ -3,6 +3,7 @@ package org.simantics.g3d.vtk.swt;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.swt.widgets.Composite;
 import org.simantics.g3d.scenegraph.RenderListener;
 import org.simantics.g3d.vtk.action.vtkAction;
@@ -18,6 +19,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 +37,11 @@ public class InteractiveVtkComposite extends vtkSwtComponent implements VtkView{
        public InteractiveVtkComposite(Composite parentComposite) {
                super(parentComposite);
                this.parentComposite = parentComposite;
-               
-               // TODO Auto-generated constructor stub
+
+               if (!Platform.inDevelopmentMode()) {
+                       // This is actually a static method in C++
+                       new vtkObject().GlobalWarningDisplayOff();
+               }
        }
        
        private boolean updating = false;