diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/nodes/AssetNode.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/nodes/AssetNode.java index a8d007530..795fc8b1f 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/nodes/AssetNode.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/nodes/AssetNode.java @@ -48,12 +48,21 @@ public class AssetNode extends FilterNode { private Node node; public AssetNode(ProjectAssetManager manager, Node node) { - super(node, new AssetChildren(manager, node), createLookupProxy(manager, node)); + super(node, isFile(node) ? Children.LEAF : new AssetChildren(manager, node), createLookupProxy(manager, node)); this.node = node; enableDelegation(DELEGATE_GET_ACTIONS); enableDelegation(DELEGATE_GET_CONTEXT_ACTIONS); } + public static boolean isFile(Node node) { + DataObject obj = null; + obj = node.getLookup().lookup(DataObject.class); + if (obj != null) { + return !obj.getPrimaryFile().isFolder(); + } + return false; + } + public static Lookup createLookupProxy(ProjectAssetManager manager, Node node) { //TODO: This is causing the most silly exception for the most silly problem // due to the most silly warning in netbeans platform