- fix posterization, delete

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7715 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent 69aa8676a0
commit 76ef4b7a67
  1. 9
      sdk/jme3-core/src/com/jme3/gde/core/filters/AbstractFilterNode.java
  2. 3
      sdk/jme3-core/src/com/jme3/gde/core/filters/FilterExplorerTopComponent.java

@ -36,11 +36,7 @@ import com.jme3.gde.core.sceneexplorer.nodes.properties.ScenePropertyChangeListe
import com.jme3.post.Filter;
import java.io.IOException;
import javax.swing.Action;
import org.openide.actions.CopyAction;
import org.openide.actions.CutAction;
import org.openide.actions.DeleteAction;
import org.openide.actions.PasteAction;
import org.openide.actions.RenameAction;
import org.openide.loaders.DataObject;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
@ -52,6 +48,7 @@ import org.openide.util.actions.SystemAction;
*
* @author normenhansen
*/
@SuppressWarnings("unchecked")
public abstract class AbstractFilterNode extends AbstractNode implements FilterNode, ScenePropertyChangeListener {
protected boolean readOnly = false;
@ -70,7 +67,6 @@ public abstract class AbstractFilterNode extends AbstractNode implements FilterN
@Override
public Action[] getActions(boolean context) {
// return super.getActions(context);
return new Action[]{
SystemAction.get(DeleteAction.class)
};
@ -78,7 +74,8 @@ public abstract class AbstractFilterNode extends AbstractNode implements FilterN
@Override
public boolean canDestroy() {
return !readOnly;
// return !readOnly;
return true;
}
@Override

@ -35,6 +35,7 @@ import com.jme3.gde.core.assets.FilterDataObject;
import com.jme3.gde.core.scene.SceneApplication;
import com.jme3.post.FilterPostProcessor;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.openide.util.NbBundle;
import org.openide.windows.TopComponent;
@ -175,8 +176,10 @@ public final class FilterExplorerTopComponent extends TopComponent implements Ex
public Object call() throws Exception {
if (enabled) {
SceneApplication.getApplication().getViewPort().addProcessor(fpp);
Logger.getLogger(FilterExplorerTopComponent.class.getName()).log(Level.INFO, "Enabled post filters");
} else {
SceneApplication.getApplication().getViewPort().removeProcessor(fpp);
Logger.getLogger(FilterExplorerTopComponent.class.getName()).log(Level.INFO, "Disabled post filters");
}
return null;
}

Loading…
Cancel
Save