Browse Source

apply patch : Terrain editor mouse wheel bug issue #23

Dokthar 9 years ago
parent
commit
e9e0e16fed

+ 6 - 1
jme3-core/src/com/jme3/gde/core/sceneviewer/SceneViewerTopComponent.java

@@ -95,9 +95,14 @@ public final class SceneViewerTopComponent extends TopComponent {
             public void mouseWheelMoved(final MouseWheelEvent e) {
                 SceneApplication.getApplication().enqueue(new Callable<Void>() {
                     public Void call() throws Exception {
-                        String action = "MouseWheel-";
+                        String action;
                         if (e.getWheelRotation() < 0) {
                             action = "MouseWheel";
+                        }else if (e.getWheelRotation() > 0) {
+                            action = "MouseWheel-";
+                        }
+                        else {
+                            return null;
                         }
                         if (app.getActiveCameraController() != null) {
                             app.getActiveCameraController().onAnalog(action, e.getWheelRotation(), 0);