Browse Source

Fix an issue where two primitive types couldn't be added to the scene

MeFisto94 5 years ago
parent
commit
7528bb7096

+ 2 - 0
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/actions/impl/ConverterVector3f_String.java

@@ -45,6 +45,8 @@ public class ConverterVector3f_String {
     
     
     public static void parseInto(String text, Vector3f res) throws IllegalArgumentException {
     public static void parseInto(String text, Vector3f res) throws IllegalArgumentException {
         text = text.replace('[', ' ');
         text = text.replace('[', ' ');
+        text = text.replace('(', ' ');
+        text = text.replace(')', ' ');
         text = text.replace(']', ' ').trim();
         text = text.replace(']', ' ').trim();
         String[] a = text.split("\\s*(,|\\s)\\s*");
         String[] a = text.split("\\s*(,|\\s)\\s*");
 
 

+ 4 - 4
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/primitives/CreateQuadPanel.java

@@ -51,12 +51,12 @@ public class CreateQuadPanel extends javax.swing.JPanel {
         return abstractNewGeometryPanel1;
         return abstractNewGeometryPanel1;
     }
     }
 
 
-    public int getQuadWidth() {
-        return (int) spinnerX.getValue();
+    public float getQuadWidth() {
+        return (float) spinnerX.getValue();
     }
     }
 
 
-    public int getQuadHeight() {
-        return (int) spinnerY.getValue();
+    public float getQuadHeight() {
+        return (float) spinnerY.getValue();
     }
     }
 
 
     public boolean isFlipCoords() {
     public boolean isFlipCoords() {