- correct threading for mousewheel input

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8663 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
nor..67 2011-11-13 22:37:00 +00:00
parent 7a98eb7008
commit b9f34d3ca5

View File

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