From a76491b66a2e304d9ae27a162f407b98c70fbafa Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Wed, 01 May 2019 20:30:24 -0400
Subject: [PATCH] Fix flush UI.

---
 GroupEditor.java |   41 +++++++++++++++++++----------------------
 1 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/GroupEditor.java b/GroupEditor.java
index 9679b9d..9db1b62 100644
--- a/GroupEditor.java
+++ b/GroupEditor.java
@@ -239,16 +239,16 @@
 		ungroupItem = menu.add(new MenuItem("Ungroup"));
 		ungroupItem.addActionListener(this);
 		menu.add("-");
-		randomItem = menu.add(new MenuItem("Random"));
+		randomItem = menu.add(new MenuItem("Switch node"));
 		randomItem.addActionListener(this);
-		physicsItem = menu.add(new MenuItem("Physics"));
-		physicsItem.addActionListener(this);
-		frameselectorItem = menu.add(new MenuItem("Frame Selector"));
-		frameselectorItem.addActionListener(this);
 		switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
 		switchGeoItem.addActionListener(this);
 		switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
 		switchTransfoItem.addActionListener(this);
+		physicsItem = menu.add(new MenuItem("Physics"));
+		physicsItem.addActionListener(this);
+		frameselectorItem = menu.add(new MenuItem("Frame Selector"));
+		frameselectorItem.addActionListener(this);
 		morphItem = menu.add(new MenuItem("Morph"));
 		morphItem.addActionListener(this);
 		scriptNodeItem = menu.add(new MenuItem("Script Node"));
@@ -454,17 +454,14 @@
 
 //		oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
 //		screenfitpointButton.addActionListener(this);
-//			oe.aConstraints.gridx += 1;
-		oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
-		snapobjectButton.addActionListener(this);
-                snapobjectButton.setToolTipText("Snap Object");
-			oe.aConstraints.gridx += 1;
 
-                //aConstraints.gridx = 0;
-                //aConstraints.gridy += 1;
-		oe.aConstraints.weighty = 0;
-		oe.aConstraints.gridwidth = 1;
-		
+                if (Globals.ADVANCED)
+                {
+                        oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
+                        snapobjectButton.addActionListener(this);
+                        snapobjectButton.setToolTipText("Snap Object");
+                }
+
 		oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
                 flashSelectionButton.setToolTipText("Show selection");
 		flashSelectionButton.addActionListener(this);
@@ -508,13 +505,13 @@
                 uneditButton.setToolTipText("Unedit selection");
 		uneditButton.addActionListener(this);
 
+		commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
+                allParamsButton.setToolTipText("Edit all params");
+		allParamsButton.addActionListener(this);
+
 		commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
                 clearPanelButton.setToolTipText("Clear edit panel");
 		clearPanelButton.addActionListener(this);
-
-		commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
-                allParamsButton.setToolTipText("All params??");
-		allParamsButton.addActionListener(this);
 
 		commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
                 unselectButton.setToolTipText("Unselect");
@@ -2238,7 +2235,7 @@
                         RandomNode random = new RandomNode();
 			group(random);
                         if (random.size() > 0)
-                            random.name = random.get(0).name + "Rnd";
+                            random.name = random.get(0).name + "Switch";
 		} else
 		if (source == physicsItem)
                 {
@@ -2895,7 +2892,7 @@
                                 
                                 child.editWindow = null; // ???????????
 			}
-			objEditor.ctrlPanel.validate();
+			objEditor.ctrlPanel.FlushUI();
 			//objEditor.jTree.clearSelection();
 			//objEditor.ResetSliders();
                     refreshContents(true);
@@ -4949,8 +4946,8 @@
 	cButton flashSelectionButton;
 	cButton editButton;
 	cButton uneditButton;
+	JCheckBox allParamsButton;
 	cButton clearpanelButton;
-	cButton allParamsButton;
 	cButton unselectButton;
 	
 	cButton screenfitButton;

--
Gitblit v1.6.2