- fix some more warnings

- fix undo for cloneable values

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7745 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 14 years ago
parent fc04902c30
commit e8118b5485
  1. 6
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/SceneExplorerProperty.java
  2. 3
      sdk/jme3-gui/src/com/jme3/gde/gui/multiview/NiftyPreviewPanel.java

@ -136,9 +136,9 @@ public class SceneExplorerProperty<T> extends PropertySupport.Reflection<T> {
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);

@ -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);

Loading…
Cancel
Save