Преглед на файлове

Fixed a bug in TexturePanel: Selecting "No Texture" in the Texture Browser successfully deletes the Texture now

MeFisto94 преди 6 години
родител
ревизия
b9fada900f
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/TexturePanel.java

+ 6 - 0
jme3-materialeditor/src/com/jme3/gde/materials/multiview/widgets/TexturePanel.java

@@ -247,6 +247,12 @@ public class TexturePanel extends MaterialPropertyWidget {
             displayPreview();
             updateFlipRepeat();
             fireChanged();
+        } else { // "No Texture" has been clicked
+            textureName = "";
+            texturePreview.setIcon(null);
+            texturePreview.setToolTipText("");
+            property.setValue("");
+            fireChanged();
         }
     }//GEN-LAST:event_jButton1ActionPerformed