- correct threading for mousewheel input

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

@ -92,14 +92,14 @@ public final class SceneViewerTopComponent extends TopComponent {
//the oGLPanel may naver have the focus.
addMouseWheelListener(new MouseWheelListener() {
public void mouseWheelMoved(MouseWheelEvent e) {
public void mouseWheelMoved(final MouseWheelEvent e) {
SceneApplication.getApplication().enqueue(new Callable<Void>() {
public Void call() throws Exception {
String action = "MouseWheel-";
if (e.getWheelRotation() < 0) {
action = "MouseWheel";
}
SceneApplication.getApplication().enqueue(new Callable<Void>() {
public Void call() throws Exception {
app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);
return null;
}

Loading…
Cancel
Save