From 4360d22f020a0eac130d446313372ea3a0896ade Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 9 Feb 2013 18:54:18 +0000 Subject: [PATCH] SDK: - Make TextureBrowser clear textures from assetManager cache after displaying them git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10380 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/core/properties/TextureBrowser.form | 2 +- .../src/com/jme3/gde/core/properties/TextureBrowser.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.form b/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.form index 6821cbd6c..424078412 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.form +++ b/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.form @@ -1,4 +1,4 @@ - +
diff --git a/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java b/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java index 8e52a06b8..451927ea2 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/properties/TextureBrowser.java @@ -31,6 +31,7 @@ */ package com.jme3.gde.core.properties; +import com.jme3.asset.TextureKey; import com.jme3.gde.core.assets.ProjectAssetManager; import com.jme3.gde.core.properties.preview.DDSPreview; import com.jme3.gde.core.util.TreeUtil; @@ -294,6 +295,7 @@ private void noTexturebuttonActionPerformed(java.awt.event.ActionEvent evt) {//G } else { Texture tex = assetManager.loadTexture(selected); newicon = ImageUtilities.image2Icon(ImageToAwt.convert(tex.getImage(), false, true, 0)); + assetManager.deleteFromCache(new TextureKey(selected)); imagePreviewLabel.setIcon(newicon); infoLabel.setText(" " + node.getUserObject() + " w : " + newicon.getIconWidth() + " h : " + newicon.getIconHeight()); }