From 51aa80a71ab90eb000fd0c112434c310b11ae160 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 16 Oct 2011 12:25:45 +0000 Subject: [PATCH] - fix Light not triggering save button git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8415 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../gde/core/sceneexplorer/nodes/JmeLight.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java index 6170fd62b..5df9f34b1 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeLight.java @@ -32,8 +32,6 @@ package com.jme3.gde.core.sceneexplorer.nodes; import com.jme3.gde.core.scene.SceneApplication; -import com.jme3.gde.core.sceneexplorer.nodes.AbstractSceneExplorerNode; -import com.jme3.gde.core.sceneexplorer.nodes.SceneExplorerNode; import com.jme3.light.Light; import com.jme3.math.ColorRGBA; import com.jme3.scene.Spatial; @@ -45,6 +43,7 @@ import javax.swing.Action; import org.openide.actions.DeleteAction; import org.openide.loaders.DataObject; import org.openide.nodes.Children; +import org.openide.nodes.Node; import org.openide.nodes.Sheet; import org.openide.util.Exceptions; import org.openide.util.ImageUtilities; @@ -74,6 +73,16 @@ public class JmeLight extends AbstractSceneExplorerNode { setName("Light"); } + protected void fireSave(boolean modified) { + Node parent = getParentNode(); + if (parent != null) { + dataObject = parent.getLookup().lookup(DataObject.class); + } + if (dataObject != null) { + dataObject.setModified(true); + } + } + @Override public Image getIcon(int type) { return smallImage; @@ -129,7 +138,7 @@ public class JmeLight extends AbstractSceneExplorerNode { spatial.removeLight(light); return null; } - }).get(); + }).get(); if (getParentNode() instanceof JmeNode) { JmeNode node = ((JmeNode) getParentNode()); if (node != null) {