- improve message to "Add to project" about usage

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7802 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent d25bfd01a1
commit 82e46247e3
  1. 4
      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); Spatial model = AssetPackLoader.loadAssetPackModel(pm, conf);
if (model != null) { if (model != null) {
ProjectAssetManager mgr = SceneApplication.getApplication().getCurrentSceneRequest().getManager(); ProjectAssetManager mgr = SceneApplication.getApplication().getCurrentSceneRequest().getManager();
if (mgr != null) { if (mgr != null && mgr != pm) {
FileObject modelFolder = mgr.getAssetFolder().getFileObject("Models"); FileObject modelFolder = mgr.getAssetFolder().getFileObject("Models");
if (modelFolder == null) { if (modelFolder == null) {
modelFolder = mgr.getAssetFolder().createFolder("Models"); modelFolder = mgr.getAssetFolder().createFolder("Models");
@ -64,7 +64,7 @@ public final class AddToProjectAction implements Action {
} else { } else {
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot copy, file 'Models' exists"); Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot copy, file 'Models' exists");
} }
} else{ } else {
Message msg = new NotifyDescriptor.Message( Message msg = new NotifyDescriptor.Message(
"Please open a model from the destination\n" "Please open a model from the destination\n"
+ "project in the SceneExplorer\n" + "project in the SceneExplorer\n"

Loading…
Cancel
Save