From e8118b548505e66b61a275f52c9b256b726e9c6c Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sun, 26 Jun 2011 13:04:49 +0000 Subject: [PATCH] - fix some more warnings - fix undo for cloneable values git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7745 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../nodes/properties/SceneExplorerProperty.java | 6 +++--- .../src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/SceneExplorerProperty.java b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/SceneExplorerProperty.java index 4c0a31df0..fafa3e1e6 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/SceneExplorerProperty.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/SceneExplorerProperty.java @@ -136,9 +136,9 @@ public class SceneExplorerProperty extends PropertySupport.Reflection { if (undo) { try { Object oldValue = getSuperValue(); - if (oldValue.getClass().getMethod("clone", null) != null) { - addUndo(oldValue.getClass().getMethod("clone", null).invoke(oldValue, null), val); - Logger.getLogger(SceneExplorerProperty.class.getName()).log(Level.INFO, "Add cloned undo {0}", oldValue.getClass().getMethod("clone", null).invoke(oldValue, null)); + if (oldValue.getClass().getMethod("clone") != null) { + addUndo(oldValue.getClass().getMethod("clone").invoke(oldValue), val); + Logger.getLogger(SceneExplorerProperty.class.getName()).log(Level.INFO, "Add cloned undo {0}", oldValue.getClass().getMethod("clone").invoke(oldValue)); } } catch (Exception e) { addUndo(getSuperValue(), val); diff --git a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java index 694ac65ba..2e159b9e0 100644 --- a/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java +++ b/sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java @@ -205,9 +205,8 @@ public class NiftyPreviewPanel extends PanelView { Logger.getLogger(NiftyPreviewPanel.class.getName()).log(Level.WARNING, "No Project AssetManager found!"); return null; } - AssetManager assetManager = pm.getManager(); AudioRenderer audioRenderer = SceneApplication.getApplication().getAudioRenderer(); - niftyDisplay = new NiftyJmeDisplay(assetManager, + niftyDisplay = new NiftyJmeDisplay(pm, inputHandler, audioRenderer, guiViewPort);