From 653cc6440c13a6d13f4366c259455be40bf6215f Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 26 Oct 2011 13:51:19 +0000 Subject: [PATCH] - SDK: check for assetmanager when opening nifty files and do not open preview in case its not available git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8530 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/gui/NiftyGuiDataObject.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java b/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java index e4633f75a..98c57c631 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/NiftyGuiDataObject.java @@ -23,8 +23,8 @@ import org.openide.util.lookup.InstanceContent; import org.openide.util.lookup.ProxyLookup; public class NiftyGuiDataObject extends XmlMultiViewDataObject { - private static final int TYPE_TOOLBAR = 0; + private static final int TYPE_TOOLBAR = 0; protected final Lookup lookup; protected final InstanceContent lookupContents = new InstanceContent(); @@ -74,7 +74,12 @@ public class NiftyGuiDataObject extends XmlMultiViewDataObject { @Override protected DesignMultiViewDesc[] getMultiViewDesc() { - return new DesignMultiViewDesc[]{new PreviewView(this, TYPE_TOOLBAR)}; + if (getLookup().lookup(ProjectAssetManager.class) == null) { + return new DesignMultiViewDesc[]{}; + } else { + + return new DesignMultiViewDesc[]{new PreviewView(this, TYPE_TOOLBAR)}; + } } @Override