Normand Briere
2019-08-04 0c85af6e46f48b7425d59fc776b193c06a4a1f52
GroupEditor.java
....@@ -356,9 +356,9 @@
356356 this.copy = this.group = group;
357357 //selectees = this.group.selectees;
358358
359
- if (copy.versions == null)
359
+ if (copy.versionlist == null)
360360 {
361
- copy.versions = new byte[100][];
361
+ copy.versionlist = new Object3D[100];
362362 copy.versionindex = -1;
363363 }
364364
....@@ -383,9 +383,9 @@
383383
384384 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
385385
386
- if (copy.versions == null)
386
+ if (copy.versionlist == null)
387387 {
388
- copy.versions = new byte[100][];
388
+ copy.versionlist = new Object3D[100];
389389 copy.versionindex = -1;
390390
391391 Save(true);
....@@ -942,12 +942,12 @@
942942
943943 cGridBag updown = new cGridBag().setVertical(true);
944944 updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
945
- restoreButton.setToolTipText("Restore current version (undo latest change)");
945
+ restoreButton.setToolTipText("Undo (restore current version)");
946946 restoreButton.addActionListener(this);
947947 restoreButton.setEnabled(false);
948948
949949 updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
950
- replaceButton.setToolTipText("Replace current version (save latest change)");
950
+ replaceButton.setToolTipText("Save (replace current version)");
951951 replaceButton.addActionListener(this);
952952 replaceButton.setEnabled(false);
953953
....@@ -1110,14 +1110,14 @@
11101110 editButton.addActionListener(this);
11111111
11121112 editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1113
- uneditButton.setToolTipText("Remove selection controls");
1113
+ uneditButton.setToolTipText("Unpin and remove selection controls");
11141114 uneditButton.addActionListener(this);
11151115
11161116 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
11171117 allParamsButton.setToolTipText("Show all controle");
11181118 allParamsButton.addActionListener(this);
11191119
1120
- editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1120
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11211121 clearPanelButton.setToolTipText("Clear edit panel");
11221122 clearPanelButton.addActionListener(this);
11231123
....@@ -2613,11 +2613,13 @@
26132613 {
26142614 // Restore current version
26152615 Restore();
2616
+ restoreButton.setEnabled(false);
26162617 } else
26172618 if (source == replaceButton)
26182619 {
26192620 // Overwrite current version
26202621 Replace();
2622
+ replaceButton.setEnabled(false);
26212623 } else
26222624 if (source == redoButton)
26232625 {
....@@ -3820,10 +3822,10 @@
38203822 {
38213823 Object3D child = (Object3D)e.nextElement();
38223824 if(child.editWindow != null)
3823
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38243825 child.pinned = false;
38253826 child.CloseUI();
38263827 listUI.remove(child);
3828
+// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
38273829
38283830 //child.editWindow = null; // ???????????
38293831 }
....@@ -3842,6 +3844,7 @@
38423844 obj.CloseUI();
38433845 }
38443846 listUI.clear();
3847
+ SetPinStates(group.selection.size() > 0);
38453848 refreshContents(true);
38463849 } else
38473850 if (source == allParamsButton)
....@@ -3928,6 +3931,7 @@
39283931 radio.layout.doClick();
39293932
39303933 ClearUnpinned();
3934
+
39313935 //Grafreed.Assert(group != null);
39323936 //Grafreed.Assert(group.selection != null);
39333937 SetPinStates(group.selection == null || group.selection.size() > 0);
....@@ -5083,9 +5087,7 @@
50835087
50845088 freezemodel = false;
50855089 }
5086
-
5087
- boolean flashIt = true;
5088
-
5090
+
50895091 public void valueChanged(TreeSelectionEvent e)
50905092 //public boolean handleEvent(Event event)
50915093 {
....@@ -5160,6 +5162,8 @@
51605162 uneditButton.setEnabled(enabled);
51615163 unselectButton.setEnabled(enabled);
51625164 flashSelectionButton.setEnabled(enabled);
5165
+
5166
+ clearPanelButton.setEnabled(!listUI.isEmpty());
51635167 }
51645168
51655169 void refreshContents(boolean cp)