2
0
rickard 3 жил өмнө
parent
commit
9f2a5b3001

+ 2 - 1
jme3-core/src/com/jme3/gde/core/scene/controller/SceneToolController.java

@@ -77,7 +77,8 @@ public class SceneToolController extends AbstractAppState {
         
         /**
          * Called when cursor's location changes.
-         * @param location 
+         *
+         * @param location location for cursor
          */
         abstract void onSetCursorLocation(Vector3f location);
     }

+ 1 - 1
jme3-scenecomposer/src/com/jme3/gde/scenecomposer/Bundle.properties

@@ -71,5 +71,5 @@ SceneComposerTopComponent.jLabel9.text=Camera Position:
 SceneComposerTopComponent.jLabel10.text=Camera Look Direction:
 SceneComposerTopComponent.jLabel11.text=(NaN, NaN, NaN)
 SceneComposerTopComponent.jLabel12.text=(NaN, NaN, NaN)
-SceneComposerTopComponent.jLabel13.text=Cursor Position:
 SceneComposerTopComponent.cursorPositionLabel.text=(NaN, NaN, NaN)
+SceneComposerTopComponent.cursorPositionHeader.text=Cursor Position:

+ 4 - 4
jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.form

@@ -81,7 +81,7 @@
                   <Group type="103" groupAlignment="0" attributes="0">
                       <Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/>
                       <Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/>
-                      <Component id="jLabel13" alignment="0" min="-2" max="-2" attributes="0"/>
+                      <Component id="cursorPositionHeader" alignment="0" min="-2" max="-2" attributes="0"/>
                   </Group>
                   <EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="0" attributes="0">
@@ -128,7 +128,7 @@
                   </Group>
                   <EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
                   <Group type="103" groupAlignment="3" attributes="0">
-                      <Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/>
+                      <Component id="cursorPositionHeader" alignment="3" min="-2" max="-2" attributes="0"/>
                       <Component id="cursorPositionLabel" alignment="3" min="-2" max="-2" attributes="0"/>
                   </Group>
               </Group>
@@ -232,10 +232,10 @@
             </Property>
           </Properties>
         </Component>
-        <Component class="javax.swing.JLabel" name="jLabel13">
+        <Component class="javax.swing.JLabel" name="cursorPositionHeader">
           <Properties>
             <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
-              <ResourceString bundle="com/jme3/gde/scenecomposer/Bundle.properties" key="SceneComposerTopComponent.jLabel13.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+              <ResourceString bundle="com/jme3/gde/scenecomposer/Bundle.properties" key="SceneComposerTopComponent.cursorPositionHeader.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
             </Property>
           </Properties>
         </Component>

+ 7 - 10
jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java

@@ -115,7 +115,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
         jLabel10 = new javax.swing.JLabel();
         jLabel11 = new javax.swing.JLabel();
         jLabel12 = new javax.swing.JLabel();
-        jLabel13 = new javax.swing.JLabel();
+        cursorPositionHeader = new javax.swing.JLabel();
         cursorPositionLabel = new javax.swing.JLabel();
         jToolBar1 = new javax.swing.JToolBar();
         transformationTypeComboBox = new javax.swing.JComboBox<>();
@@ -213,7 +213,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
 
         org.openide.awt.Mnemonics.setLocalizedText(jLabel12, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.jLabel12.text")); // NOI18N
 
-        org.openide.awt.Mnemonics.setLocalizedText(jLabel13, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.jLabel13.text")); // NOI18N
+        org.openide.awt.Mnemonics.setLocalizedText(cursorPositionHeader, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.cursorPositionHeader.text")); // NOI18N
 
         org.openide.awt.Mnemonics.setLocalizedText(cursorPositionLabel, org.openide.util.NbBundle.getMessage(SceneComposerTopComponent.class, "SceneComposerTopComponent.cursorPositionLabel.text")); // NOI18N
 
@@ -239,7 +239,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
                 .addGroup(sceneInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(jLabel9)
                     .addComponent(jLabel10)
-                    .addComponent(jLabel13))
+                    .addComponent(cursorPositionHeader))
                 .addGap(34, 34, 34)
                 .addGroup(sceneInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                     .addComponent(cursorPositionLabel)
@@ -276,7 +276,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce
                     .addComponent(jLabel12))
                 .addGap(8, 8, 8)
                 .addGroup(sceneInfoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel13)
+                    .addComponent(cursorPositionHeader)
                     .addComponent(cursorPositionLabel)))
         );
 
@@ -834,6 +834,7 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/
     // Variables declaration - do not modify//GEN-BEGIN:variables
     private javax.swing.JButton camToCursorSelectionButton;
     private javax.swing.JButton createPhysicsMeshButton;
+    private javax.swing.JLabel cursorPositionHeader;
     private javax.swing.JLabel cursorPositionLabel;
     private javax.swing.JButton cursorToSelectionButton;
     private javax.swing.JButton emitButton;
@@ -847,7 +848,6 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/
     private javax.swing.JLabel jLabel10;
     private javax.swing.JLabel jLabel11;
     private javax.swing.JLabel jLabel12;
-    private javax.swing.JLabel jLabel13;
     private javax.swing.JLabel jLabel2;
     private javax.swing.JLabel jLabel3;
     private javax.swing.JLabel jLabel4;
@@ -1301,11 +1301,8 @@ private void jToggleSelectGeomActionPerformed(java.awt.event.ActionEvent evt) {/
     public void sceneClosed(SceneRequest request) {
         if (request.equals(currentRequest)) {
             setActivatedNodes(new org.openide.nodes.Node[]{});
-            if(request.getManager() != null){
-//                request.getManager().clearCache();
-                if (listener != null) {
-                    listener = null;
-                }
+            if(request.getManager() != null && listener != null) {
+                listener = null;
             }
 
             SceneApplication.getApplication().removeSceneListener(this);