Normand Briere
2019-08-22 6a145f6c81dfcbe0653eda27d042efb48daa7512
GroupEditor.java
....@@ -29,7 +29,7 @@
2929 {
3030 cButton skyboxButton;
3131 final String path = "cubemaps/" + f + "-skyboxes/" + s;
32
- row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF));
32
+ row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.NIMBUSLAF));
3333 //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
3434 skyboxButton.setToolTipText(s.equals("") ? "No background" : s);
3535 skyboxButton.addActionListener(new ActionListener()
....@@ -46,7 +46,7 @@
4646 {
4747 cButton textureButton;
4848 final String path = "textures/" + f + "/" + c + "/"; // + t;
49
- row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF));
49
+ row.add(textureButton = GetButton(path + "icons/" + t, !Globals.NIMBUSLAF));
5050 textureButton.setToolTipText(c + count);
5151 textureButton.addActionListener(new ActionListener()
5252 {
....@@ -347,7 +347,7 @@
347347
348348 public void CreateSkyboxPanel(cGridBag skyboxPanel)
349349 {
350
- JTabbedPane skyboxpane = new JTabbedPane();
350
+ JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT);
351351
352352 AddSkyboxTab0(skyboxpane);
353353 AddSkyboxTab1(skyboxpane);
....@@ -415,12 +415,14 @@
415415 this.copy = this.group = group;
416416 //selectees = this.group.selectees;
417417
418
+ assert(false);
419
+
418420 if (copy.versionlist == null)
419421 {
420422 copy.versionlist = new Object3D[100];
421423 copy.versionindex = -1;
422424
423
- Save(true);
425
+ //Save(true);
424426 }
425427
426428 if(ui)
....@@ -449,7 +451,7 @@
449451 copy.versionlist = new Object3D[100];
450452 copy.versionindex = -1;
451453
452
- Save(true);
454
+ //Save(true);
453455 }
454456 }
455457
....@@ -855,9 +857,9 @@
855857 hideleavesItem.addActionListener(this);
856858 showleavesItem = menu.add(new MenuItem("Show Leaves"));
857859 showleavesItem.addActionListener(this);
858
- markleavesItem = menu.add(new MenuItem("Mark Leaves"));
860
+ markleavesItem = menu.add(new MenuItem("Anim Leaves"));
859861 markleavesItem.addActionListener(this);
860
- unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
862
+ unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves"));
861863 unmarkleavesItem.addActionListener(this);
862864 rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
863865 rewindleavesItem.addActionListener(this);
....@@ -934,6 +936,8 @@
934936 cGridBag currenttab;
935937 //boolean added; // patch for jar
936938
939
+ int totalcount = 0;
940
+
937941 int tabcount = 0;
938942 int colcount = 0;
939943 int rowcount = 0;
....@@ -962,7 +966,7 @@
962966 texturecount = 0;
963967 }
964968
965
- if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg"))
969
+ if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png")))
966970 {
967971 //if (!added)
968972 {
....@@ -971,7 +975,8 @@
971975 currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
972976 }
973977
974
- AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab);
978
+ AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab);
979
+ totalcount++;
975980
976981 if (++colcount >= columns)
977982 {
....@@ -997,6 +1002,8 @@
9971002 container.add(resourcecontainer);
9981003
9991004 Grafreed.ParseResources("textures", this);
1005
+
1006
+ // 935. System.out.println("Total = " + totalcount);
10001007 }
10011008
10021009 void SetupUI2(ObjEditor oe)
....@@ -1036,9 +1043,9 @@
10361043 oe.radioPanel.add(dummyButton);
10371044 oe.buttonGroup.add(dummyButton);
10381045 */
1039
- cGridBag copyOptionsPanel = new cGridBag();
1046
+ cGridBag versionManagerPanel = new cGridBag();
10401047
1041
- copyOptionsPanel.preferredHeight = 2;
1048
+ versionManagerPanel.preferredHeight = 4;
10421049
10431050 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
10441051
....@@ -1065,25 +1072,25 @@
10651072 // }
10661073 // });
10671074
1068
- oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1075
+ oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10691076 collapseButton.setToolTipText("Collapse toolbar");
10701077 collapseButton.addActionListener(this);
10711078
1072
- oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1079
+ oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10731080 maximize3DButton.setToolTipText("Maximize 3D view");
10741081 maximize3DButton.addActionListener(this);
10751082
1076
- oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1083
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10771084 twoButton.setToolTipText("Show 3D view only");
10781085 twoButton.addActionListener(this);
10791086 this.fullscreenLayout = twoButton;
10801087
1081
- oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1088
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10821089 threeButton.setToolTipText("Show controls and 3D view");
10831090 threeButton.addActionListener(this);
10841091 if (Globals.ADVANCED)
10851092 {
1086
- oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1093
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10871094 sixButton.setToolTipText("Show 3D view and controls");
10881095 sixButton.addActionListener(this);
10891096 }
....@@ -1092,50 +1099,51 @@
10921099 // sevenButton.addActionListener(this);
10931100 //
10941101
1095
- oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1102
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10961103 fullButton.setToolTipText("Full-screen window");
10971104 fullButton.addActionListener(this);
10981105
1099
- oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1106
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11001107 screenfitButton.setToolTipText("Screen fit");
11011108 screenfitButton.addActionListener(this);
11021109
1103
- oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1110
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11041111 restoreCameraButton.setToolTipText("Restore viewpoint");
11051112 restoreCameraButton.addActionListener(this);
11061113
1107
- copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1114
+ versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11081115 saveVersionButton.setToolTipText("Duplicate current version");
11091116 saveVersionButton.addActionListener(this);
11101117
1111
- copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1118
+ versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11121119 deleteVersionButton.setToolTipText("Delete current version");
11131120 deleteVersionButton.addActionListener(this);
1121
+ deleteVersionButton.setEnabled(false);
11141122
1115
- copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1123
+ versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11161124 previousVersionButton.setToolTipText("Previous version");
11171125 previousVersionButton.addActionListener(this);
11181126 previousVersionButton.setEnabled(false);
11191127
11201128 cGridBag updown = new cGridBag().setVertical(true);
1121
- updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1129
+ updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11221130 restoreButton.setToolTipText("Undo (restore current version)");
11231131 restoreButton.addActionListener(this);
1124
- //restoreButton.setEnabled(false);
1132
+ restoreButton.setEnabled(false);
11251133
1126
- updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1134
+ updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11271135 replaceButton.setToolTipText("Save (replace current version)");
11281136 replaceButton.addActionListener(this);
1129
- //replaceButton.setEnabled(false);
1137
+ replaceButton.setEnabled(false);
11301138
1131
- copyOptionsPanel.add(updown);
1139
+ versionManagerPanel.add(updown);
11321140
1133
- copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1141
+ versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11341142 nextVersionButton.setToolTipText("Next version");
11351143 nextVersionButton.addActionListener(this);
11361144 nextVersionButton.setEnabled(false);
11371145
1138
- oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1146
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11391147 oneStepButton.setToolTipText("Animate one step forward");
11401148 oneStepButton.addActionListener(this);
11411149
....@@ -1158,11 +1166,11 @@
11581166
11591167 if (Globals.ADVANCED)
11601168 {
1161
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1169
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11621170 snapobjectButton.addActionListener(this);
11631171 snapobjectButton.setToolTipText("Snap Object");
11641172
1165
- oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1173
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11661174 fourButton.addActionListener(this);
11671175 fourButton.setToolTipText("Show control panel only");
11681176 }
....@@ -1170,11 +1178,11 @@
11701178 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
11711179
11721180
1173
- oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1181
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11741182 rootButton.setToolTipText("Open selection in new tab");
11751183 rootButton.addActionListener(this);
11761184
1177
- oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1185
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11781186 closeButton.setToolTipText("Close tab");
11791187 closeButton.addActionListener(this);
11801188 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -1183,38 +1191,38 @@
11831191 cGridBag row1 = new cGridBag();
11841192
11851193 // INSERT
1186
- row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1194
+ row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11871195 gridButton.setToolTipText("Create ground");
11881196 gridButton.addActionListener(this);
11891197
1190
- row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1198
+ row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11911199 boxButton.setToolTipText("Create box");
11921200 boxButton.addActionListener(this);
11931201
1194
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1202
+ row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11951203 superButton.setToolTipText("Create superellipsoid");
11961204 superButton.addActionListener(this);
11971205
1198
- row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1206
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11991207 sphereButton.setToolTipText("Create sphere");
12001208 sphereButton.addActionListener(this);
12011209
1202
- row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1210
+ row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12031211 coneButton.setToolTipText("Create cone");
12041212 coneButton.addActionListener(this);
12051213
1206
- row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1214
+ row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12071215 torusButton.setToolTipText("Create torus");
12081216 torusButton.addActionListener(this);
12091217
12101218 if (Globals.ADVANCED)
12111219 {
1212
- oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1220
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12131221 kleinButton.setToolTipText("Create Klein bottle");
12141222 kleinButton.addActionListener(this);
12151223 }
12161224
1217
- row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1225
+ row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12181226 particlesButton.setToolTipText("Create particle system");
12191227 particlesButton.addActionListener(this);
12201228
....@@ -1222,31 +1230,31 @@
12221230
12231231 cGridBag row2 = new cGridBag();
12241232
1225
- row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1233
+ row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12261234 groupButton.setToolTipText("Create group");
12271235 groupButton.addActionListener(this);
12281236
1229
- row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1237
+ row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12301238 compositeButton.setToolTipText("Create composite");
12311239 compositeButton.addActionListener(this);
12321240
1233
- row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1241
+ row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12341242 switchButton.setToolTipText("Create item switcher");
12351243 switchButton.addActionListener(this);
12361244
1237
- row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1245
+ row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12381246 loopButton.setToolTipText("Create loop");
12391247 loopButton.addActionListener(this);
12401248
1241
- row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1249
+ row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12421250 textureButton.setToolTipText("Create texture");
12431251 textureButton.addActionListener(this);
12441252
1245
- row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1253
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12461254 overlayButton.setToolTipText("Create overlay");
12471255 overlayButton.addActionListener(this);
12481256
1249
- row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1257
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12501258 lightButton.setToolTipText("Create light");
12511259 lightButton.addActionListener(this);
12521260
....@@ -1256,6 +1264,11 @@
12561264
12571265 CreateTexturePanel(textures);
12581266
1267
+ int tabCount = resourcecontainer.getTabCount();
1268
+
1269
+ if (tabCount > 0)
1270
+ resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount));
1271
+
12591272 oe.toolboxPanel.add(textures);
12601273
12611274 textures.preferredHeight = 100;
....@@ -1263,11 +1276,11 @@
12631276 CreateSkyboxPanel(oe.skyboxPanel);
12641277
12651278 // EDIT panel
1266
- editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1279
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12671280 editButton.setToolTipText("Pin selection controls");
12681281 editButton.addActionListener(this);
12691282
1270
- editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1283
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12711284 uneditButton.setToolTipText("Unpin and remove selection controls");
12721285 uneditButton.addActionListener(this);
12731286
....@@ -1275,7 +1288,7 @@
12751288 allParamsButton.setToolTipText("Show all controls");
12761289 allParamsButton.addActionListener(this);
12771290
1278
- editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1291
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12791292 clearPanelButton.setToolTipText("Clear all controls");
12801293 clearPanelButton.addActionListener(this);
12811294
....@@ -1283,7 +1296,7 @@
12831296 //unselectButton.setToolTipText("Unselect");
12841297 //unselectButton.addActionListener(this);
12851298
1286
- editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1299
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12871300 flashSelectionButton.setToolTipText("Highlight selection");
12881301 flashSelectionButton.addActionListener(this);
12891302
....@@ -1306,6 +1319,8 @@
13061319
13071320 cGridBag jSPPanel = new cGridBag();
13081321
1322
+ jSPPanel.preferredHeight = 20;
1323
+
13091324 JScrollPane jSP;
13101325 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
13111326 jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
....@@ -1314,11 +1329,11 @@
13141329 oe.treePanel.add(jSPPanel);
13151330 oe.treePanel.Return();
13161331
1317
- oe.treePanel.add(copyOptionsPanel);
1332
+ oe.treePanel.add(versionManagerPanel);
13181333 oe.treePanel.Return();
1319
- cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1320
- versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1321
- sliderPane.preferredHeight = 1;
1334
+ versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1335
+ versionSlider = (cNumberSlider)versionSliderPane.getComponent(1);
1336
+ versionSliderPane.preferredHeight = 3;
13221337
13231338 // mainPanel.setDividerLocation(0.1); //1.0);
13241339 mainPanel.setResizeWeight(0.4);
....@@ -3963,6 +3978,8 @@
39633978 if (source == closeButton)
39643979 {
39653980 //System.out.println("CLOSE: " + buttonGroup.getSelection());
3981
+ Replace();
3982
+
39663983 cRadio ab;
39673984 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
39683985 {
....@@ -4061,6 +4078,8 @@
40614078 } else
40624079 if(source instanceof cRadio)
40634080 {
4081
+ Replace();
4082
+
40644083 group.parent = keepparent;
40654084 group.attributes = 0;
40664085 //group.editWindow = null;
....@@ -4116,13 +4135,21 @@
41164135
41174136 if (copy.versionlist == null)
41184137 {
4119
- copy.versionlist = new Object3D[100];
41204138 copy.versionindex = -1;
41214139
41224140 // Cannot work with loops
4123
- // To fix this issue, first mark all nodes above the root,
4141
+ // To fix this issue, we first mark all nodes above the root,
41244142 // and check if any of these nodes are reachable below the root.
4125
- //Save(true);
4143
+ Grafreed.grafreed.universe.TagObjects(copy, true);
4144
+
4145
+ if (!copy.HasTags())
4146
+ {
4147
+ copy.versionlist = new Object3D[100];
4148
+
4149
+ Save(true);
4150
+ }
4151
+
4152
+ Grafreed.grafreed.universe.TagObjects(copy, false);
41264153 }
41274154
41284155 SetVersionStates();
....@@ -4270,7 +4297,7 @@
42704297 TouchTransform(obj);
42714298 continue;
42724299 }
4273
- if ((mask&2) != 0) // Scale
4300
+ if ((mask&2) != 0) // Scale/rotation
42744301 {
42754302 obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1;
42764303 obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0;
....@@ -4278,10 +4305,6 @@
42784305 obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1;
42794306 obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0;
42804307 obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0;
4281
- }
4282
- if ((mask&4) != 0) // Rotation
4283
- {
4284
- // ?
42854308 }
42864309 if ((mask&1) != 0) // Translation
42874310 {
....@@ -5380,6 +5403,7 @@
53805403
53815404 void refreshContents(boolean cp)
53825405 {
5406
+ if (Globals.ADVANCED)
53835407 //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
53845408 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
53855409 {