Browse Source

- correct threading for mousewheel input

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8663 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 13 years ago
parent
commit
d19a6c76cd

+ 5 - 5
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) {
-                String action = "MouseWheel-";
-                if (e.getWheelRotation() < 0) {
-                    action = "MouseWheel";
-                }
+            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";
+                        }
                         app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);
                         return null;
                     }