- correct threading for mousewheel input

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8662 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 4ec2d57a32
commit 7a98eb7008
  1. 9
      sdk/jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java

@ -34,6 +34,7 @@ import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.util.concurrent.Callable;
import java.util.logging.Logger;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
@ -96,7 +97,13 @@ public final class SceneViewerTopComponent extends TopComponent {
if (e.getWheelRotation() < 0) {
action = "MouseWheel";
}
app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);
SceneApplication.getApplication().enqueue(new Callable<Void>() {
public Void call() throws Exception {
app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);
return null;
}
});
}
});
addKeyListener(new KeyListener() {

Loading…
Cancel
Save