]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java
Only disable warning display when not in development mode
[simantics/3d.git] / org.simantics.g3d.vtk / src / org / simantics / g3d / vtk / awt / InteractiveVtkPanel.java
index 09e88ae6534fd86de33a0a4ef9294103fcf09313..d697070cfbae165dfb49ff7cf3efe5a3dd28c738 100644 (file)
@@ -16,6 +16,7 @@ import java.awt.event.MouseEvent;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.eclipse.core.runtime.Platform;
 import org.simantics.g3d.scenegraph.RenderListener;
 import org.simantics.g3d.vtk.action.vtkAction;
 import org.simantics.g3d.vtk.common.VtkView;
@@ -29,6 +30,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 +54,12 @@ public class InteractiveVtkPanel extends vtkPanel implements VtkView {
        
        public InteractiveVtkPanel() {
                super();
+               
+               if (!Platform.inDevelopmentMode()) {
+                       // This is actually a static method in C++
+                       new vtkObject().GlobalWarningDisplayOff();
+               }
+               
                iren = new vtkGenericRenderWindowInteractor();
                iren.SetRenderWindow(rw);
                iren.TimerEventResetsTimerOff();