]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
Only disable warning display when not in development mode 18/4218/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 6 May 2020 09:54:01 +0000 (12:54 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 6 May 2020 09:58:40 +0000 (09:58 +0000)
Development mode refers to the Eclipse RCP's -dev argument.

gitlab #124

Change-Id: Ie7112586ef4663f080589f293e4b62065bebe584

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 9ede257ed5cf3436bbc1ad6157bd648dd84cd5d1..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;
@@ -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);
index aaa2091699a01a56989d78931813589ce4ddc41f..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;
@@ -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;