Browse Source

Fixes #88 - TextureBrowser: Release the old Texture when setting the path to a new one.

MeFisto94 9 years ago
parent
commit
94565fc3ea
1 changed files with 1 additions and 0 deletions
  1. 1 0
      jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java

+ 1 - 0
jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java

@@ -234,6 +234,7 @@ private void noTexturebuttonActionPerformed(java.awt.event.ActionEvent evt) {//G
             selected = selected.substring(0, selected.lastIndexOf("/"));
             selected = selected.substring(0, selected.lastIndexOf("/"));
 //            Texture tex = assetManager.loadTexture(selected);
 //            Texture tex = assetManager.loadTexture(selected);
 //            editor.setValue(tex);
 //            editor.setValue(tex);
+            editor.setValue(null); // Invalidate the old texture
             editor.setAsText(selected);
             editor.setAsText(selected);
             return true;
             return true;
         }
         }