From 96c6fa59447052b824f7858e2afd50e9ae29022b Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 19 Nov 2011 16:34:03 +0000 Subject: [PATCH] SDK: - fix in nifty cleanup threading git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8729 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/gde/gui/multiview/NiftyPreviewPanel.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java index 0cf685294..9bc1956de 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java @@ -73,7 +73,7 @@ public class NiftyPreviewPanel extends PanelView { toolBar.setPreferredSize(new Dimension(10000, 24)); toolBar.setMaximumSize(new Dimension(10000, 24)); toolBar.setFloatable(false); - JComboBox comboBox = new JComboBox(new String[]{"640x480", "480x800","800x480", "800x600", "1024x768", "1280x720"}); + JComboBox comboBox = new JComboBox(new String[]{"640x480", "480x800", "800x480", "800x600", "1024x768", "1280x720"}); comboBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { @@ -273,6 +273,12 @@ public class NiftyPreviewPanel extends PanelView { public void cleanup() { offPanel.stopPreview(); - nifty.exit(); + SceneApplication.getApplication().enqueue(new Callable() { + + public Object call() throws Exception { + nifty.exit(); + return null; + } + }); } }