- improve FakeApplication and SceneApplication cleanup

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10105 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 12 years ago
parent 733ad2fdbe
commit 20dce97f5d
  1. 8
      sdk/jme3-core/src/com/jme3/gde/core/scene/FakeApplication.java
  2. 5
      sdk/jme3-core/src/com/jme3/gde/core/scene/SceneApplication.java

@ -394,11 +394,11 @@ public class FakeApplication extends SimpleApplication {
private ScheduledThreadPoolExecutor fakeAppThread = new ScheduledThreadPoolExecutor(1);
public void cleanupFakeApp() {
if (rootNode == null) {
return;
}
clearNode(rootNode);
runQueuedFake();
appStateManager = new FakeAppStateManager(this);
if (rootNode != null) {
clearNode(rootNode);
}
}
public void startFakeApp() {

@ -325,8 +325,6 @@ public class SceneApplication extends Application implements LookupProvider {
}
}
//TODO: Lookup for Application
public Lookup createAdditionalLookup(Lookup baseContext) {
return Lookups.fixed(getApplication());
@ -477,7 +475,7 @@ public class SceneApplication extends Application implements LookupProvider {
}
private void checkSave(SceneRequest request) {
if ((request != null)
if ((request != null) && request.getDataObject() != null
&& request.getDataObject().isModified()) {
final DataObject req = request.getDataObject();
Confirmation mesg = new NotifyDescriptor.Confirmation("Scene has not been saved,\ndo you want to save it?",
@ -658,5 +656,4 @@ public class SceneApplication extends Application implements LookupProvider {
public boolean isAwt() {
return java.awt.EventQueue.isDispatchThread();
}
}

Loading…
Cancel
Save