From 21ac57b36a9e3b909853c7d64ac29b7ad72490a3 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 02 Sep 2019 16:52:19 -0400
Subject: [PATCH] Figure panel.

---
 GroupEditor.java |   57 ++++++++++++++++++++++++---------------------------------
 1 files changed, 24 insertions(+), 33 deletions(-)

diff --git a/GroupEditor.java b/GroupEditor.java
index c1f3bea..ae9ebf2 100644
--- a/GroupEditor.java
+++ b/GroupEditor.java
@@ -368,16 +368,6 @@
         refreshContents();
     }
 
-    public void Show3DView()
-    {
-        // bug
-        //gridPanel.setDividerLocation(1.0);
-        //bigPanel.setDividerLocation(0.0);
-        bigThree.ClearUI();
-        bigThree.add(centralPanel);
-        bigThree.FlushUI();
-    }
-
     //ObjEditor objEditor;
 	public void closeUI2()
 	{
@@ -766,10 +756,10 @@
                 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
 		shadowZItem.addActionListener(this);
                 
-        if (Globals.ADVANCED)
-        {
 		attributeItem = menu.add(new MenuItem("Attribute"));
 		attributeItem.addActionListener(this);
+        if (Globals.ADVANCED)
+        {
 		menu.add("-");
 		linkerItem = menu.add(new MenuItem("Linker"));
 		linkerItem.addActionListener(this);
@@ -1081,13 +1071,17 @@
 //                        }
 //                });
                 
+		oe.toolbarPanel.add(fullScreenButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
+                fullScreenButton.setToolTipText("Full-screen window");
+		fullScreenButton.addActionListener(this);
+                
 		oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
                 collapseButton.setToolTipText("Collapse toolbar");
 		collapseButton.addActionListener(this);
                 
-		oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
-                maximize3DButton.setToolTipText("Maximize 3D view");
-		maximize3DButton.addActionListener(this);
+//		oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
+//                maximize3DButton.setToolTipText("Maximize 3D view");
+//		maximize3DButton.addActionListener(this);
                 
 		oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
                 twoButton.setToolTipText("Show 3D view only");
@@ -1107,10 +1101,6 @@
 //                sevenButton.setToolTipText("3-column layout");
 //		sevenButton.addActionListener(this);
                 //
-                
-		oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
-                fullButton.setToolTipText("Full-screen window");
-		fullButton.addActionListener(this);
                 
 		oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
                 screenfitButton.setToolTipText("Screen fit");
@@ -2722,11 +2712,11 @@
                     if (!group.selection.isEmpty())
                     {
                         Composite csg = new GroupLeaf();
+			group(csg);
                         csg.count = 5;
                         Composite child = new cGroup("Branch");
                         csg.addChild(child);
                         child.addChild(csg);
-			group(csg);
                     }
 		} else
 		if (source == doubleItem)
@@ -2734,6 +2724,7 @@
                     if (!group.selection.isEmpty())
                     {
                         Composite csg = new GroupLeaf("Fork");
+			group(csg);
                         csg.count = 5;
                         Composite child = new cGroup("Branch A");
                         csg.addChild(child);
@@ -2741,7 +2732,6 @@
                         child = new cGroup("Branch B");
                         csg.addChild(child);
                         child.addChild(csg);
-			group(csg);
                     }
 		} else
 		if (source == tripleItem)
@@ -2807,7 +2797,7 @@
 		{
 			Maximize();
 		} else
-		if (source == fullButton)
+		if (source == fullScreenButton)
 		{
 			ToggleFullScreen();
 		} else
@@ -2816,13 +2806,13 @@
                         this.expandedLayout = radio.layout;
 			CollapseToolbar();
 		} else
-		if (source == maximize3DButton)
-		{
-                        this.expandedLayout = radio.layout;
-                        radio.layout = twoButton;
-                        Show3DView();
-			CollapseToolbar();
-		} else
+//		if (source == maximize3DButton)
+//		{
+//                        this.expandedLayout = radio.layout;
+//                        radio.layout = twoButton;
+//			CollapseToolbar();
+//                        Show3DView();
+//		} else
 		if (source == previousVersionButton)
 		{
                         // Go to previous version
@@ -4169,9 +4159,10 @@
             // and check if any of these nodes are reachable below the root.
             Grafreed.grafreed.universe.TagObjects(copy, true);
             
-            if (copy instanceof Composite && copy.versionlist == null && !copy.HasTags())
+            if (copy instanceof Composite && !copy.HasTags())
             {
-                copy.versionlist = new Object3D[100];
+                if (copy.versionlist == null)
+                    copy.versionlist = new Object3D[100];
                 
                 //Save(true);
             }
@@ -5374,7 +5365,7 @@
 			if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
                             // a camera
                         {
-                            if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
+                            if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crashes the camera because of invalid lightspace
                             {
                                 CameraPane.camerachangeframe = 0; // don't refuse it
                                 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
@@ -5426,7 +5417,7 @@
 
         void refreshContents(boolean cp)
         {
-            if (Globals.ADVANCED)
+            if (Globals.SHOWINFO)
             //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
             if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
             {

--
Gitblit v1.6.2