From fdd0253aacdc24137181a9c2d70f5c2ea5d2a472 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Fri, 26 Aug 2011 21:19:15 +0000 Subject: [PATCH] SDK: - make plugin windows not open on start when tehy were left open on close git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8118 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/gde/scenecomposer/SceneComposerTopComponent.java | 3 +++ .../jme3/gde/terraineditor/TerrainEditorTopComponent.java | 4 +++- .../jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form | 2 +- .../jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java | 5 +++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java index b36b31372..0a11ef68c 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java @@ -614,6 +614,9 @@ private void emitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FI tb.setVisible(true); } } + if (currentRequest == null) { + close(); + } } @Override diff --git a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java index c2a9a4eec..3105ab538 100644 --- a/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java +++ b/sdk/jme3-terrain-editor/src/com/jme3/gde/terraineditor/TerrainEditorTopComponent.java @@ -929,7 +929,9 @@ public final class TerrainEditorTopComponent extends TopComponent implements Sce @Override public void componentOpened() { super.componentOpened(); - + if (currentRequest == null) { + close(); + } } @Override diff --git a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form index 672500aa8..b7ae89286 100644 --- a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form +++ b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.form @@ -753,7 +753,7 @@ - + diff --git a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java index 93f3036e8..98889ae84 100644 --- a/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java +++ b/sdk/jme3-vehicle-creator/src/com/jme3/gde/vehiclecreator/VehicleCreatorTopComponent.java @@ -788,12 +788,13 @@ public final class VehicleCreatorTopComponent extends TopComponent implements Sc @Override public void componentOpened() { - // TODO add custom code on component opening + if (currentRequest == null) { + close(); + } } @Override public void componentClosed() { - // TODO add custom code on component closing if (currentRequest != null) { SceneApplication.getApplication().closeScene(currentRequest); }