From: Tuukka Lehtonen Date: Wed, 6 May 2020 09:54:01 +0000 (+0300) Subject: Only disable warning display when not in development mode X-Git-Tag: v1.43.0~12 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F4218%2F2;p=simantics%2F3d.git Only disable warning display when not in development mode Development mode refers to the Eclipse RCP's -dev argument. gitlab #124 Change-Id: Ie7112586ef4663f080589f293e4b62065bebe584 --- 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 9ede257e..d697070c 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 @@ -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; @@ -54,8 +55,10 @@ public class InteractiveVtkPanel extends vtkPanel implements VtkView { public InteractiveVtkPanel() { super(); - // This is actually a static method in C++ - new vtkObject().GlobalWarningDisplayOff(); + if (!Platform.inDevelopmentMode()) { + // This is actually a static method in C++ + new vtkObject().GlobalWarningDisplayOff(); + } iren = new vtkGenericRenderWindowInteractor(); iren.SetRenderWindow(rw); 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 aaa20916..540e300a 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 @@ -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; @@ -37,8 +38,10 @@ public class InteractiveVtkComposite extends vtkSwtComponent implements VtkView{ super(parentComposite); this.parentComposite = parentComposite; - // This is actually a static method in C++ - new vtkObject().GlobalWarningDisplayOff(); + if (!Platform.inDevelopmentMode()) { + // This is actually a static method in C++ + new vtkObject().GlobalWarningDisplayOff(); + } } private boolean updating = false;