From 8670eb677c67d8d750fb410f14b1de22ae557f06 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Wed, 6 May 2020 12:54:01 +0300 Subject: [PATCH] Only disable warning display when not in development mode Development mode refers to the Eclipse RCP's -dev argument. gitlab #124 Change-Id: Ie7112586ef4663f080589f293e4b62065bebe584 --- .../src/org/simantics/g3d/vtk/awt/InteractiveVtkPanel.java | 7 +++++-- .../org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java | 7 +++++-- 2 files changed, 10 insertions(+), 4 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 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; -- 2.45.2