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.

---
 ObjEditor.java   |   31 +++++++++++++++++++++++++------
 GroupEditor.java |   12 ++++++------
 Object3D.java    |    1 +
 3 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/GroupEditor.java b/GroupEditor.java
index 397b6c7..9db1b62 100644
--- a/GroupEditor.java
+++ b/GroupEditor.java
@@ -505,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");
@@ -2892,7 +2892,7 @@
                                 
                                 child.editWindow = null; // ???????????
 			}
-			objEditor.ctrlPanel.validate();
+			objEditor.ctrlPanel.FlushUI();
 			//objEditor.jTree.clearSelection();
 			//objEditor.ResetSliders();
                     refreshContents(true);
@@ -4946,8 +4946,8 @@
 	cButton flashSelectionButton;
 	cButton editButton;
 	cButton uneditButton;
+	JCheckBox allParamsButton;
 	cButton clearpanelButton;
-	cButton allParamsButton;
 	cButton unselectButton;
 	
 	cButton screenfitButton;
diff --git a/ObjEditor.java b/ObjEditor.java
index d3eefb5..b81d8f2 100644
--- a/ObjEditor.java
+++ b/ObjEditor.java
@@ -143,6 +143,8 @@
         //nameField.removeActionListener(this);
 //        objEditor.ctrlPanel.remove(nameField);
         
+        objEditor.ctrlPanel.remove(namePanel);
+        
         if (!GroupEditor.allparams)
             return;
         
@@ -165,7 +167,6 @@
 //        objEditor.ctrlPanel.remove(fasterButton);
 //        objEditor.ctrlPanel.remove(remarkButton);
         
-        objEditor.ctrlPanel.remove(namePanel);
         objEditor.ctrlPanel.remove(setupPanel);
         objEditor.ctrlPanel.remove(commandsPanel);
         objEditor.ctrlPanel.remove(pushPanel);
@@ -967,28 +968,45 @@
             setupPanel = new cGridBag().setVertical(false);
             
         liveCB = AddCheckBox(setupPanel, "Live", copy.live);
-        if (Globals.ADVANCED)
-                link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
+                liveCB.setToolTipText("Animate object");
         hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
+                hideCB.setToolTipText("Hide object");
 //            Return();
         markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
-        rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind);
-        randomCB = AddCheckBox(setupPanel, "Rand", copy.random);
+        markCB.setToolTipText("Set the animation target transform");
+        
+        rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
+        rewindCB.setToolTipText("Rewind animation");
+        
+        randomCB = AddCheckBox(setupPanel, "Random", copy.random);
+        randomCB.setToolTipText("Option for switch node");
 
+        if (Globals.ADVANCED)
+        {
+                link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
+                link2masterCB.setToolTipText("Attach to support");
+                speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
+                speedupCB.setToolTipText("Option motion capture");
+        }
+        
         oe.ctrlPanel.add(setupPanel);
         oe.ctrlPanel.Return();
         
             commandsPanel = new cGridBag().setVertical(false);
         
         resetButton = AddButton(commandsPanel, "Reset");
+        resetButton.setToolTipText("Jump to frame zero");
         stepButton = AddButton(commandsPanel, "Step");
+        stepButton.setToolTipText("Step one frame");
 //            resetAllButton = AddButton(oe, "Reset All");
 //            stepAllButton = AddButton(oe, "Step All");
-        speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup);
 //            Return();
         slowerButton = AddButton(commandsPanel, "Slow");
+        slowerButton.setToolTipText("Decrease animation speed");
         fasterButton = AddButton(commandsPanel, "Fast");
+        fasterButton.setToolTipText("Increase animation speed");
         remarkButton = AddButton(commandsPanel, "Remark");
+        remarkButton.setToolTipText("Set the current transform as the target");
 
         oe.ctrlPanel.add(commandsPanel);
         oe.ctrlPanel.Return();
@@ -2979,6 +2997,7 @@
         if (event.getSource() == randomCB)
         {
             copy.random ^= true;
+            objEditor.refreshContents();
             return;
         }
         if (event.getSource() == speedupCB)
diff --git a/Object3D.java b/Object3D.java
index 2cb44d8..1478589 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -7378,6 +7378,7 @@
             objectUI.closeUI();
             if (editWindow != null)
             {
+                editWindow.ctrlPanel.FlushUI();
                 editWindow.refreshContents();
             } // ? new
             objectUI = null;

--
Gitblit v1.6.2