Normand Briere
2019-07-17 a5580a47d246c1272b10adba68070f6e13da5e41
GroupEditor.java
....@@ -84,6 +84,10 @@
8484
8585 void CloneSelection(boolean supports)
8686 {
87
+ if (Globals.REPLACEONMAKE)
88
+ Save();
89
+ boolean keep = Globals.REPLACEONMAKE;
90
+ Globals.REPLACEONMAKE = false;
8791 // Object3D keep = GrafreeD.clipboard;
8892 //Object3D obj;
8993 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +98,7 @@
9498
9599 makeSomething(clone, i==group.selection.size()-1);
96100 }
101
+ Globals.REPLACEONMAKE = keep;
97102 }
98103
99104 void CloneClipboard(boolean supports)
....@@ -220,7 +225,7 @@
220225 // toggleSwitchItem.addItemListener(this);
221226 // toggleSwitchItem.setState(CameraPane.SWITCH);
222227
223
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
228
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
224229 toggleHandleItem.addItemListener(this);
225230 toggleHandleItem.setState(CameraPane.HANDLES);
226231
....@@ -380,13 +385,14 @@
380385 shadowYItem.addActionListener(this);
381386 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
382387 shadowZItem.addActionListener(this);
388
+ attributeItem = menu.add(new MenuItem("Attribute"));
389
+ attributeItem.addActionListener(this);
390
+
383391 if (Globals.ADVANCED)
384392 {
385393 menu.add("-");
386394 linkerItem = menu.add(new MenuItem("Linker"));
387395 linkerItem.addActionListener(this);
388
- attributeItem = menu.add(new MenuItem("Attribute"));
389
- attributeItem.addActionListener(this);
390396 templateItem = menu.add(new MenuItem("Template"));
391397 templateItem.addActionListener(this);
392398 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -538,6 +544,7 @@
538544 buildToolsMenu(menu);
539545 }
540546
547
+
541548 void SetupUI2(ObjEditor oe)
542549 {
543550 // June 2019
....@@ -582,7 +589,7 @@
582589 */
583590 cGridBag copyOptionsPanel = new cGridBag();
584591
585
- copyOptionsPanel.preferredHeight = 2;
592
+ copyOptionsPanel.preferredHeight = 1;
586593
587594 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
588595
....@@ -590,50 +597,66 @@
590597 //minButton.setToolTipText("Minimize window");
591598 //minButton.addActionListener(this);
592599
593
- oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594
- maxButton.setToolTipText("Maximize window");
595
- maxButton.addActionListener(this);
600
+ if (Globals.ADVANCED)
601
+ {
602
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603
+ maxButton.setToolTipText("Maximize window");
604
+ maxButton.addActionListener(this);
605
+ }
596606
597607 oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
598608 fullButton.setToolTipText("Full-screen window");
599609 fullButton.addActionListener(this);
600610
611
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612
+ screenfitButton.setToolTipText("Screen fit");
613
+ screenfitButton.addActionListener(this);
614
+
601615 oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602616 restoreCameraButton.setToolTipText("Restore viewpoint");
603617 restoreCameraButton.addActionListener(this);
604618
619
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
+ saveButton.setToolTipText("New version");
621
+ saveButton.addActionListener(this);
622
+
605623 copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
606
- undoButton.setToolTipText("Undo changes");
624
+ undoButton.setToolTipText("Previous version");
607625 undoButton.addActionListener(this);
608626 undoButton.setEnabled(false);
609627
628
+ cGridBag updown = new cGridBag().setVertical(true);
629
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
+ restoreButton.setToolTipText("Restore current");
631
+ restoreButton.addActionListener(this);
632
+ restoreButton.setEnabled(false);
633
+
634
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
635
+ replaceButton.setToolTipText("Replace current");
636
+ replaceButton.addActionListener(this);
637
+ replaceButton.setEnabled(false);
638
+
639
+ copyOptionsPanel.add(updown);
640
+
610641 copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
- redoButton.setToolTipText("Redo changes");
642
+ redoButton.setToolTipText("Next version");
612643 redoButton.addActionListener(this);
613644 redoButton.setEnabled(false);
614645
615
- copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616
- saveButton.setToolTipText("Save changes");
617
- saveButton.addActionListener(this);
618
-
619
- copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
646
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
620647 liveCB.setToolTipText("Enable animation");
621648 liveCB.addItemListener(this);
622649
623
- copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624651 oneStepButton.setToolTipText("Animate one step forward");
625652 oneStepButton.addActionListener(this);
626653
627
- copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
654
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
628655 fastCB.setToolTipText("Fast mode");
629656 fastCB.addItemListener(this);
630657
631658 //oe.toolboxPanel.Return();
632659
633
- copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- screenfitButton.setToolTipText("Screen fit");
635
- screenfitButton.addActionListener(this);
636
-
637660 // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
638661 // trackCB.setToolTipText("Enable tracking");
639662 // trackCB.addItemListener(this);
....@@ -726,7 +749,7 @@
726749 compositeButton.addActionListener(this);
727750
728751 oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
729
- switchButton.setToolTipText("Create switch");
752
+ switchButton.setToolTipText("Create item switcher");
730753 switchButton.addActionListener(this);
731754
732755 oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -758,16 +781,16 @@
758781 }
759782
760783 // EDIT panel
761
- editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
762
- editButton.setToolTipText("Edit selection");
784
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
785
+ editButton.setToolTipText("Pin selection controls");
763786 editButton.addActionListener(this);
764787
765
- editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
766
- uneditButton.setToolTipText("Unedit selection");
788
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
789
+ uneditButton.setToolTipText("Remove selection controls");
767790 uneditButton.addActionListener(this);
768791
769792 editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
770
- allParamsButton.setToolTipText("Edit all params");
793
+ allParamsButton.setToolTipText("Show all controle");
771794 allParamsButton.addActionListener(this);
772795
773796 editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -784,6 +807,7 @@
784807
785808 editCommandsPanel.preferredHeight = 1;
786809
810
+ SetPinStates(false);
787811 // oe.treePanel.add(commandsPanel);
788812 // oe.treePanel.Return();
789813
....@@ -810,6 +834,9 @@
810834
811835 oe.treePanel.add(copyOptionsPanel);
812836 oe.treePanel.Return();
837
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 10, 0);
838
+ versionField = (cNumberSlider)sliderPane.getComponent(1);
839
+ sliderPane.preferredHeight = 1;
813840
814841 // mainPanel.setDividerLocation(0.5); //1.0);
815842 // mainPanel.setResizeWeight(0.5);
....@@ -857,14 +884,18 @@
857884 boxCB.addItemListener(this);
858885
859886 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
860
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
887
+ zoomBoxCB.setToolTipText("Display only for wheel");
861888 zoomBoxCB.addItemListener(this);
862889
863890 if (true) // Globals.ADVANCED)
864891 {
865
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
866
- supportCB.setToolTipText("Enable rigging");
867
- supportCB.addItemListener(this);
892
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
893
+// supportCB.setToolTipText("Enable rigging");
894
+// supportCB.addItemListener(this);
895
+
896
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
897
+ freezeCB.setToolTipText("Fast moving camera");
898
+ freezeCB.addItemListener(this);
868899
869900 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
870901 // localCB.addItemListener(this);
....@@ -919,7 +950,7 @@
919950 oeilCB.addItemListener(this);
920951
921952 panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
922
- shadowCB.setToolTipText("Compute shadows when live");
953
+ shadowCB.setToolTipText("When live compute shadows");
923954 shadowCB.addItemListener(this);
924955
925956 panel.Return();
....@@ -928,12 +959,12 @@
928959 toggleTextureCB.addItemListener(this);
929960
930961 panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
931
- toggleSwitchCB.setToolTipText("Use switch");
962
+ toggleSwitchCB.setToolTipText("Choose a single item");
932963 toggleSwitchCB.addItemListener(this);
933964
934
- panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
935
- autosaveCB.setToolTipText("Auto-save on structure change");
936
- autosaveCB.addItemListener(this);
965
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
966
+ autokeepCB.setToolTipText("On structure change");
967
+ autokeepCB.addItemListener(this);
937968
938969 panel.Return();
939970 if (Globals.ADVANCED)
....@@ -962,7 +993,7 @@
962993 {
963994 cRadio radioButton = new cRadio(obj.name);
964995
965
- // Patch to avoid bug with transparency.
996
+ // June 2019. Patch to avoid bug with transparency.
966997 radioButton.hadMaterial = obj.material != null;
967998 if (!radioButton.hadMaterial)
968999 {
....@@ -999,6 +1030,7 @@
9991030 cCheckBox slowCB;
10001031 cCheckBox boxCB;
10011032 cCheckBox zoomBoxCB;
1033
+ cCheckBox freezeCB;
10021034 //cToggleButton trackCB;
10031035 cCheckBox trackCB;
10041036 cCheckBox smoothfocusCB;
....@@ -1009,7 +1041,7 @@
10091041
10101042 cCheckBox oeilCB;
10111043 cCheckBox shadowCB;
1012
- cCheckBox autosaveCB;
1044
+ cCheckBox autokeepCB;
10131045 cCheckBox lookAtCB;
10141046
10151047 // static int COLOR = 1;
....@@ -1117,9 +1149,13 @@
11171149 {
11181150 Globals.COMPUTESHADOWWHENLIVE ^= true;
11191151 }
1120
- else if(e.getSource() == autosaveCB)
1152
+ else if(e.getSource() == freezeCB)
11211153 {
1122
- Globals.SAVEONMAKE ^= true;
1154
+ Globals.FREEZEONMOVE ^= true;
1155
+ }
1156
+ else if(e.getSource() == autokeepCB)
1157
+ {
1158
+ Globals.REPLACEONMAKE ^= true;
11231159 }
11241160 else if(e.getSource() == lookAtCB)
11251161 {
....@@ -1201,8 +1237,6 @@
12011237 }
12021238 }
12031239
1204
- String string = (String) object;
1205
-
12061240 System.out.println("Transfer = " + object + "; drop : " + target);
12071241 // if( object instanceof java.io.File[])
12081242 // {
....@@ -1210,6 +1244,8 @@
12101244 // objEditor.DropFile((java.io.File[]) object, true);
12111245 // return;
12121246 // }
1247
+
1248
+ String string = object.toString();
12131249
12141250 // File path for Mac and Windows
12151251 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1459,6 +1495,9 @@
14591495 animationItem.addItemListener(this);
14601496 animationItem.setState(Globals.ANIMATION);
14611497
1498
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1499
+ archiveItem.addActionListener(this);
1500
+
14621501 menu.add("-");
14631502 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
14641503 parseverticesItem.addActionListener(this);
....@@ -1471,6 +1510,8 @@
14711510 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
14721511 reduce34MorphItem.addActionListener(this);
14731512 menu.add("-");
1513
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1514
+ memoryItem.addActionListener(this);
14741515 menu.add(computeAOItem = new MenuItem("Compute AO"));
14751516 computeAOItem.addActionListener(this);
14761517
....@@ -1479,8 +1520,6 @@
14791520 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
14801521 mirrorItem.addActionListener(this);
14811522 menu.add("-");
1482
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1483
- memoryItem.addActionListener(this);
14841523 menu.add(analyzeItem = new MenuItem("Analyze"));
14851524 analyzeItem.addActionListener(this);
14861525 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1628,6 +1667,20 @@
16281667
16291668 makeSomething(shadow);
16301669 }
1670
+
1671
+ private void ClearUnpinned()
1672
+ {
1673
+ //for (Object3D obj : listUI)
1674
+ for (int i=listUI.size(); --i>=0;)
1675
+ {
1676
+ Object3D obj = listUI.elementAt(i);
1677
+ if (!obj.pinned)
1678
+ {
1679
+ obj.CloseUI();
1680
+ listUI.remove(i);
1681
+ }
1682
+ }
1683
+ }
16311684
16321685 /**
16331686 * applyExample
....@@ -2107,25 +2160,25 @@
21072160 Composite csg = new GroupLeaf();
21082161 csg.count = 5;
21092162 group(csg);
2110
- Composite child = new cGroup();
2163
+ Composite child = new cGroup("Branch");
21112164 csg.addChild(child);
21122165 child.addChild(csg);
21132166 } else
21142167 if (source == doubleItem)
21152168 {
2116
- Composite csg = new GroupLeaf();
2169
+ Composite csg = new GroupLeaf("Fork");
21172170 csg.count = 5;
21182171 group(csg);
2119
- Composite child = new cGroup();
2172
+ Composite child = new cGroup("Branch A");
21202173 csg.addChild(child);
21212174 child.addChild(csg);
2122
- child = new cGroup();
2175
+ child = new cGroup("Branch B");
21232176 csg.addChild(child);
21242177 child.addChild(csg);
21252178 } else
21262179 if (source == tripleItem)
21272180 {
2128
- Composite csg = new GroupLeaf();
2181
+ Composite csg = new GroupLeaf("Trident");
21292182 csg.count = 4;
21302183 group(csg);
21312184 Composite child = new cGroup();
....@@ -2189,15 +2242,31 @@
21892242 } else
21902243 if (source == undoButton)
21912244 {
2245
+ // Go to previous version
2246
+ //if (!Undo())
2247
+ //java.awt.Toolkit.getDefaultToolkit().beep();
21922248 Undo();
2249
+ } else
2250
+ if (source == restoreButton)
2251
+ {
2252
+ // Restore current version
2253
+ Restore();
2254
+ } else
2255
+ if (source == replaceButton)
2256
+ {
2257
+ // Overwrite current version
2258
+ Replace();
21932259 } else
21942260 if (source == redoButton)
21952261 {
2262
+ // Go to next version
21962263 Redo();
21972264 } else
21982265 if (source == saveButton)
21992266 {
2200
- Save();
2267
+ // Save a new version
2268
+ if (!Save(true))
2269
+ java.awt.Toolkit.getDefaultToolkit().beep();
22012270 } else
22022271 if (source == oneStepButton)
22032272 {
....@@ -2206,17 +2275,14 @@
22062275 } else
22072276 if (source == screenfitButton)
22082277 {
2209
- //Reload(lastConverter, lastFilename, true);
22102278 ScreenFit();
22112279 } else
22122280 if (source == screenfitpointButton)
22132281 {
2214
- //Reload(lastConverter, lastFilename, true);
22152282 ScreenFitPoint();
22162283 } else
22172284 if (source == snapobjectButton)
22182285 {
2219
- //Reload(lastConverter, lastFilename, true);
22202286 SnapObject();
22212287 } else
22222288 // if (event.getSource() == recompileButton)
....@@ -2740,15 +2806,28 @@
27402806 } else
27412807 if (source == ungroupItem || source == ungroupButton)
27422808 {
2743
- //ungroup();
2809
+ boolean hasRoot = false;
2810
+
27442811 for (int i=0; i<group.selection.size(); i++)
27452812 {
2746
- Ungroup(group.selection.get(i));
2813
+ if (group.selection.get(i) == group)
2814
+ {
2815
+ hasRoot = true;
2816
+ break;
2817
+ }
27472818 }
27482819
2749
- ClearSelection(false);
2750
-
2751
- refreshContents();
2820
+ if (!hasRoot)
2821
+ {
2822
+ for (int i=0; i<group.selection.size(); i++)
2823
+ {
2824
+ Ungroup(group.selection.get(i));
2825
+ }
2826
+
2827
+ ClearSelection(false);
2828
+
2829
+ refreshContents();
2830
+ }
27522831 } else
27532832 if (source == genUVItem)
27542833 {
....@@ -3372,7 +3451,7 @@
33723451 //copy.ClearUI();
33733452 for (Object3D obj : listUI)
33743453 {
3375
- obj.pinned = true;
3454
+ obj.pinned = false;
33763455 obj.CloseUI();
33773456 }
33783457 listUI.clear();
....@@ -3431,6 +3510,9 @@
34313510 }
34323511
34333512 copy = group;
3513
+
3514
+ SetUndoStates();
3515
+
34343516 //Globals.theRenderer.object = group;
34353517 if(!useclient)
34363518 {
....@@ -3457,6 +3539,11 @@
34573539 currentLayout = sevenButton;
34583540 */
34593541 radio.layout.doClick();
3542
+
3543
+ ClearUnpinned();
3544
+ SetPinStates(group.selection.size() > 0);
3545
+ if (group.selection.size() == 1)
3546
+ EditSelection(false);
34603547 keepparent = group.parent;
34613548 // PARENT = NULL or not???
34623549 //group.parent = null; // ROOT
....@@ -4616,17 +4703,7 @@
46164703 //new Exception().printStackTrace();
46174704
46184705 freezemodel = true;
4619
-
4620
- //for (Object3D obj : listUI)
4621
- for (int i=listUI.size(); --i>=0;)
4622
- {
4623
- Object3D obj = listUI.elementAt(i);
4624
- if (!obj.pinned)
4625
- {
4626
- obj.CloseUI();
4627
- listUI.remove(i);
4628
- }
4629
- }
4706
+ ClearUnpinned();
46304707
46314708 /**/
46324709 //switch (event.id)
....@@ -4689,12 +4766,14 @@
46894766 {
46904767 editButton.setEnabled(enabled);
46914768 uneditButton.setEnabled(enabled);
4769
+ unselectButton.setEnabled(enabled);
4770
+ flashSelectionButton.setEnabled(enabled);
46924771 }
46934772
46944773 void refreshContents(boolean cp)
46954774 {
46964775 if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4697
- if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
4776
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
46984777 {
46994778 objEditor.ClearInfo(); // .GetMaterial());
47004779
....@@ -4793,8 +4872,8 @@
47934872
47944873 if (cut)
47954874 {
4796
- if (Globals.SAVEONMAKE)
4797
- Save();
4875
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4876
+// Save();
47984877 //int indices[] = jList.getSelectedIndices();
47994878 //for (int i = indices.length - 1; i >= 0; i--)
48004879 //jList.remove(indices[i]);
....@@ -4897,6 +4976,10 @@
48974976
48984977 void paste(boolean expand)
48994978 {
4979
+ if (Globals.REPLACEONMAKE)
4980
+ Save();
4981
+ boolean keep = Globals.REPLACEONMAKE;
4982
+ Globals.REPLACEONMAKE = false;
49004983 // if (GrafreeD.clipboard == null)
49014984 // return;
49024985 boolean first = true;
....@@ -4956,6 +5039,7 @@
49565039 Grafreed.clipboard.get(0).parent = keepparent;
49575040 }
49585041
5042
+ Globals.REPLACEONMAKE = keep;
49595043 ResetModel();
49605044 refreshContents();
49615045 }
....@@ -5091,6 +5175,10 @@
50915175
50925176 void group(Object3D csg, boolean grab)
50935177 {
5178
+ if (Globals.REPLACEONMAKE)
5179
+ Save();
5180
+ boolean keep = Globals.REPLACEONMAKE;
5181
+ Globals.REPLACEONMAKE = false;
50945182 if (//false) // why??
50955183 !group.selection.isEmpty())
50965184 {
....@@ -5204,10 +5292,15 @@
52045292 //node.add(csg);
52055293 //makeSomething(node);
52065294 makeSomething(csg);
5295
+ Globals.REPLACEONMAKE = keep;
52075296 }
52085297
52095298 void Ungroup(Object3D g)
52105299 {
5300
+ if (Globals.REPLACEONMAKE)
5301
+ Save();
5302
+ boolean keep = Globals.REPLACEONMAKE;
5303
+ Globals.REPLACEONMAKE = false;
52115304 if (g instanceof HiddenObject)
52125305 {
52135306 HiddenObject h = (HiddenObject) g;
....@@ -5224,6 +5317,7 @@
52245317 objEditor.makeSomething(g.get(i), false);
52255318 }
52265319 }
5320
+ Globals.REPLACEONMAKE = keep;
52275321 }
52285322
52295323 void ungroup()
....@@ -5514,9 +5608,6 @@
55145608
55155609 cButton restoreCameraButton;
55165610
5517
- cButton minButton;
5518
- cButton maxButton;
5519
- cButton fullButton;
55205611 cButton saveButton;
55215612 cButton oneStepButton;
55225613