]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.g3d.vtk/src/org/simantics/g3d/vtk/swt/InteractiveVtkComposite.java
Improve cameraAndSelectorAction api
[simantics/3d.git] / org.simantics.g3d.vtk / src / org / simantics / g3d / vtk / swt / InteractiveVtkComposite.java
index aaa2091699a01a56989d78931813589ce4ddc41f..da984c086650c2c4578b7593175e44a4c5a9cfb1 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;
@@ -179,11 +182,6 @@ public class InteractiveVtkComposite extends vtkSwtComponent implements VtkView{
        
        public void lock() {
                getVTKLock().lock();
-               if (getComponent().getContext() != null && !getComponent().getContext().isCurrent()) {
-                       @SuppressWarnings("unused")
-                       int ret = getComponent().getContext().makeCurrent();
-//                     System.out.println("Make current2 " + ret);
-               }
        }
        
        public void unlock() {