From 82e46247e38a7d932a6bc687ed3b730e31758bbc Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 2 Jul 2011 00:28:19 +0000 Subject: [PATCH] - improve message to "Add to project" about usage git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7802 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/gde/assetpack/actions/AddToProjectAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java index 8c9112480..33eabbda2 100644 --- a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java +++ b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java @@ -49,7 +49,7 @@ public final class AddToProjectAction implements Action { Spatial model = AssetPackLoader.loadAssetPackModel(pm, conf); if (model != null) { ProjectAssetManager mgr = SceneApplication.getApplication().getCurrentSceneRequest().getManager(); - if (mgr != null) { + if (mgr != null && mgr != pm) { FileObject modelFolder = mgr.getAssetFolder().getFileObject("Models"); if (modelFolder == null) { modelFolder = mgr.getAssetFolder().createFolder("Models"); @@ -64,7 +64,7 @@ public final class AddToProjectAction implements Action { } else { Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot copy, file 'Models' exists"); } - } else{ + } else { Message msg = new NotifyDescriptor.Message( "Please open a model from the destination\n" + "project in the SceneExplorer\n"