.. | .. |
---|
84 | 84 | |
---|
85 | 85 | void CloneSelection(boolean supports) |
---|
86 | 86 | { |
---|
| 87 | + if (Globals.SAVEONMAKE) |
---|
| 88 | + Save(); |
---|
| 89 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 90 | + Globals.SAVEONMAKE = false; |
---|
87 | 91 | // Object3D keep = GrafreeD.clipboard; |
---|
88 | 92 | //Object3D obj; |
---|
89 | 93 | for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
94 | 98 | |
---|
95 | 99 | makeSomething(clone, i==group.selection.size()-1); |
---|
96 | 100 | } |
---|
| 101 | + Globals.SAVEONMAKE = keep; |
---|
97 | 102 | } |
---|
98 | 103 | |
---|
99 | 104 | void CloneClipboard(boolean supports) |
---|
.. | .. |
---|
220 | 225 | // toggleSwitchItem.addItemListener(this); |
---|
221 | 226 | // toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
222 | 227 | |
---|
223 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
| 228 | + cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles")); |
---|
224 | 229 | toggleHandleItem.addItemListener(this); |
---|
225 | 230 | toggleHandleItem.setState(CameraPane.HANDLES); |
---|
226 | 231 | |
---|
.. | .. |
---|
380 | 385 | shadowYItem.addActionListener(this); |
---|
381 | 386 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
382 | 387 | shadowZItem.addActionListener(this); |
---|
| 388 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 389 | + attributeItem.addActionListener(this); |
---|
| 390 | + |
---|
383 | 391 | if (Globals.ADVANCED) |
---|
384 | 392 | { |
---|
385 | 393 | menu.add("-"); |
---|
386 | 394 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
387 | 395 | linkerItem.addActionListener(this); |
---|
388 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
389 | | - attributeItem.addActionListener(this); |
---|
390 | 396 | templateItem = menu.add(new MenuItem("Template")); |
---|
391 | 397 | templateItem.addActionListener(this); |
---|
392 | 398 | pointflowItem = menu.add(new MenuItem("Point Flow")); |
---|
.. | .. |
---|
582 | 588 | */ |
---|
583 | 589 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
584 | 590 | |
---|
585 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 591 | + copyOptionsPanel.preferredHeight = 1; |
---|
586 | 592 | |
---|
587 | 593 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
588 | 594 | |
---|
.. | .. |
---|
590 | 596 | //minButton.setToolTipText("Minimize window"); |
---|
591 | 597 | //minButton.addActionListener(this); |
---|
592 | 598 | |
---|
593 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
594 | | - maxButton.setToolTipText("Maximize window"); |
---|
595 | | - maxButton.addActionListener(this); |
---|
| 599 | + if (Globals.ADVANCED) |
---|
| 600 | + { |
---|
| 601 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 602 | + maxButton.setToolTipText("Maximize window"); |
---|
| 603 | + maxButton.addActionListener(this); |
---|
| 604 | + } |
---|
596 | 605 | |
---|
597 | 606 | oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
598 | 607 | fullButton.setToolTipText("Full-screen window"); |
---|
599 | 608 | fullButton.addActionListener(this); |
---|
600 | 609 | |
---|
| 610 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 611 | + screenfitButton.setToolTipText("Screen fit"); |
---|
| 612 | + screenfitButton.addActionListener(this); |
---|
| 613 | + |
---|
601 | 614 | oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
602 | 615 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
603 | 616 | restoreCameraButton.addActionListener(this); |
---|
.. | .. |
---|
630 | 643 | |
---|
631 | 644 | //oe.toolboxPanel.Return(); |
---|
632 | 645 | |
---|
633 | | - copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - screenfitButton.setToolTipText("Screen fit"); |
---|
635 | | - screenfitButton.addActionListener(this); |
---|
636 | | - |
---|
637 | 646 | // copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
638 | 647 | // trackCB.setToolTipText("Enable tracking"); |
---|
639 | 648 | // trackCB.addItemListener(this); |
---|
.. | .. |
---|
726 | 735 | compositeButton.addActionListener(this); |
---|
727 | 736 | |
---|
728 | 737 | oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
729 | | - switchButton.setToolTipText("Create switch"); |
---|
| 738 | + switchButton.setToolTipText("Create item switcher"); |
---|
730 | 739 | switchButton.addActionListener(this); |
---|
731 | 740 | |
---|
732 | 741 | oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
758 | 767 | } |
---|
759 | 768 | |
---|
760 | 769 | // EDIT panel |
---|
761 | | - editCommandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
762 | | - editButton.setToolTipText("Edit selection"); |
---|
| 770 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 771 | + editButton.setToolTipText("Pin selection controls"); |
---|
763 | 772 | editButton.addActionListener(this); |
---|
764 | 773 | |
---|
765 | | - editCommandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
766 | | - uneditButton.setToolTipText("Unedit selection"); |
---|
| 774 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 775 | + uneditButton.setToolTipText("Remove selection controls"); |
---|
767 | 776 | uneditButton.addActionListener(this); |
---|
768 | 777 | |
---|
769 | 778 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
770 | | - allParamsButton.setToolTipText("Edit all params"); |
---|
| 779 | + allParamsButton.setToolTipText("Show all controle"); |
---|
771 | 780 | allParamsButton.addActionListener(this); |
---|
772 | 781 | |
---|
773 | 782 | editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
784 | 793 | |
---|
785 | 794 | editCommandsPanel.preferredHeight = 1; |
---|
786 | 795 | |
---|
| 796 | + SetPinStates(false); |
---|
787 | 797 | // oe.treePanel.add(commandsPanel); |
---|
788 | 798 | // oe.treePanel.Return(); |
---|
789 | 799 | |
---|
.. | .. |
---|
857 | 867 | boxCB.addItemListener(this); |
---|
858 | 868 | |
---|
859 | 869 | panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints); |
---|
860 | | - zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 870 | + zoomBoxCB.setToolTipText("Display only for wheel"); |
---|
861 | 871 | zoomBoxCB.addItemListener(this); |
---|
862 | 872 | |
---|
863 | 873 | if (true) // Globals.ADVANCED) |
---|
864 | 874 | { |
---|
865 | | - panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
866 | | - supportCB.setToolTipText("Enable rigging"); |
---|
867 | | - supportCB.addItemListener(this); |
---|
| 875 | +// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints); |
---|
| 876 | +// supportCB.setToolTipText("Enable rigging"); |
---|
| 877 | +// supportCB.addItemListener(this); |
---|
| 878 | + |
---|
| 879 | + panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 880 | + freezeCB.setToolTipText("Fast moving camera"); |
---|
| 881 | + freezeCB.addItemListener(this); |
---|
868 | 882 | |
---|
869 | 883 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
870 | 884 | // localCB.addItemListener(this); |
---|
.. | .. |
---|
919 | 933 | oeilCB.addItemListener(this); |
---|
920 | 934 | |
---|
921 | 935 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
922 | | - shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 936 | + shadowCB.setToolTipText("When live compute shadows"); |
---|
923 | 937 | shadowCB.addItemListener(this); |
---|
924 | 938 | |
---|
925 | 939 | panel.Return(); |
---|
.. | .. |
---|
928 | 942 | toggleTextureCB.addItemListener(this); |
---|
929 | 943 | |
---|
930 | 944 | panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints); |
---|
931 | | - toggleSwitchCB.setToolTipText("Use switch"); |
---|
| 945 | + toggleSwitchCB.setToolTipText("Choose a single item"); |
---|
932 | 946 | toggleSwitchCB.addItemListener(this); |
---|
933 | 947 | |
---|
934 | 948 | panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
935 | | - autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 949 | + autosaveCB.setToolTipText("On structure change"); |
---|
936 | 950 | autosaveCB.addItemListener(this); |
---|
937 | 951 | |
---|
938 | 952 | panel.Return(); |
---|
.. | .. |
---|
962 | 976 | { |
---|
963 | 977 | cRadio radioButton = new cRadio(obj.name); |
---|
964 | 978 | |
---|
965 | | - // Patch to avoid bug with transparency. |
---|
| 979 | + // June 2019. Patch to avoid bug with transparency. |
---|
966 | 980 | radioButton.hadMaterial = obj.material != null; |
---|
967 | 981 | if (!radioButton.hadMaterial) |
---|
968 | 982 | { |
---|
.. | .. |
---|
999 | 1013 | cCheckBox slowCB; |
---|
1000 | 1014 | cCheckBox boxCB; |
---|
1001 | 1015 | cCheckBox zoomBoxCB; |
---|
| 1016 | + cCheckBox freezeCB; |
---|
1002 | 1017 | //cToggleButton trackCB; |
---|
1003 | 1018 | cCheckBox trackCB; |
---|
1004 | 1019 | cCheckBox smoothfocusCB; |
---|
.. | .. |
---|
1117 | 1132 | { |
---|
1118 | 1133 | Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
1119 | 1134 | } |
---|
| 1135 | + else if(e.getSource() == freezeCB) |
---|
| 1136 | + { |
---|
| 1137 | + Globals.FREEZEONMOVE ^= true; |
---|
| 1138 | + } |
---|
1120 | 1139 | else if(e.getSource() == autosaveCB) |
---|
1121 | 1140 | { |
---|
1122 | 1141 | Globals.SAVEONMAKE ^= true; |
---|
.. | .. |
---|
1201 | 1220 | } |
---|
1202 | 1221 | } |
---|
1203 | 1222 | |
---|
1204 | | - String string = (String) object; |
---|
1205 | | - |
---|
1206 | 1223 | System.out.println("Transfer = " + object + "; drop : " + target); |
---|
1207 | 1224 | // if( object instanceof java.io.File[]) |
---|
1208 | 1225 | // { |
---|
.. | .. |
---|
1210 | 1227 | // objEditor.DropFile((java.io.File[]) object, true); |
---|
1211 | 1228 | // return; |
---|
1212 | 1229 | // } |
---|
| 1230 | + |
---|
| 1231 | + String string = object.toString(); |
---|
1213 | 1232 | |
---|
1214 | 1233 | // File path for Mac and Windows |
---|
1215 | 1234 | if (string.charAt(0) == '/' || string.charAt(1) == ':') |
---|
.. | .. |
---|
1459 | 1478 | animationItem.addItemListener(this); |
---|
1460 | 1479 | animationItem.setState(Globals.ANIMATION); |
---|
1461 | 1480 | |
---|
| 1481 | + menu.add(archiveItem = new MenuItem("Archive3D...")); |
---|
| 1482 | + archiveItem.addActionListener(this); |
---|
| 1483 | + |
---|
1462 | 1484 | menu.add("-"); |
---|
1463 | 1485 | parseverticesItem = menu.add(new MenuItem("Multiplicity")); |
---|
1464 | 1486 | parseverticesItem.addActionListener(this); |
---|
.. | .. |
---|
1471 | 1493 | reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)")); |
---|
1472 | 1494 | reduce34MorphItem.addActionListener(this); |
---|
1473 | 1495 | menu.add("-"); |
---|
| 1496 | + menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
| 1497 | + memoryItem.addActionListener(this); |
---|
1474 | 1498 | menu.add(computeAOItem = new MenuItem("Compute AO")); |
---|
1475 | 1499 | computeAOItem.addActionListener(this); |
---|
1476 | 1500 | |
---|
.. | .. |
---|
1479 | 1503 | mirrorItem = menu.add(new MenuItem("Mirror Poses")); |
---|
1480 | 1504 | mirrorItem.addActionListener(this); |
---|
1481 | 1505 | menu.add("-"); |
---|
1482 | | - menu.add(memoryItem = new MenuItem("Memory Usage")); |
---|
1483 | | - memoryItem.addActionListener(this); |
---|
1484 | 1506 | menu.add(analyzeItem = new MenuItem("Analyze")); |
---|
1485 | 1507 | analyzeItem.addActionListener(this); |
---|
1486 | 1508 | menu.add(dumpItem = new MenuItem("Print")); |
---|
.. | .. |
---|
1628 | 1650 | |
---|
1629 | 1651 | makeSomething(shadow); |
---|
1630 | 1652 | } |
---|
| 1653 | + |
---|
| 1654 | + private void ClearUnpinned() |
---|
| 1655 | + { |
---|
| 1656 | + //for (Object3D obj : listUI) |
---|
| 1657 | + for (int i=listUI.size(); --i>=0;) |
---|
| 1658 | + { |
---|
| 1659 | + Object3D obj = listUI.elementAt(i); |
---|
| 1660 | + if (!obj.pinned) |
---|
| 1661 | + { |
---|
| 1662 | + obj.CloseUI(); |
---|
| 1663 | + listUI.remove(i); |
---|
| 1664 | + } |
---|
| 1665 | + } |
---|
| 1666 | + } |
---|
1631 | 1667 | |
---|
1632 | 1668 | /** |
---|
1633 | 1669 | * applyExample |
---|
.. | .. |
---|
2107 | 2143 | Composite csg = new GroupLeaf(); |
---|
2108 | 2144 | csg.count = 5; |
---|
2109 | 2145 | group(csg); |
---|
2110 | | - Composite child = new cGroup(); |
---|
| 2146 | + Composite child = new cGroup("Branch"); |
---|
2111 | 2147 | csg.addChild(child); |
---|
2112 | 2148 | child.addChild(csg); |
---|
2113 | 2149 | } else |
---|
2114 | 2150 | if (source == doubleItem) |
---|
2115 | 2151 | { |
---|
2116 | | - Composite csg = new GroupLeaf(); |
---|
| 2152 | + Composite csg = new GroupLeaf("Fork"); |
---|
2117 | 2153 | csg.count = 5; |
---|
2118 | 2154 | group(csg); |
---|
2119 | | - Composite child = new cGroup(); |
---|
| 2155 | + Composite child = new cGroup("Branch A"); |
---|
2120 | 2156 | csg.addChild(child); |
---|
2121 | 2157 | child.addChild(csg); |
---|
2122 | | - child = new cGroup(); |
---|
| 2158 | + child = new cGroup("Branch B"); |
---|
2123 | 2159 | csg.addChild(child); |
---|
2124 | 2160 | child.addChild(csg); |
---|
2125 | 2161 | } else |
---|
2126 | 2162 | if (source == tripleItem) |
---|
2127 | 2163 | { |
---|
2128 | | - Composite csg = new GroupLeaf(); |
---|
| 2164 | + Composite csg = new GroupLeaf("Trident"); |
---|
2129 | 2165 | csg.count = 4; |
---|
2130 | 2166 | group(csg); |
---|
2131 | 2167 | Composite child = new cGroup(); |
---|
.. | .. |
---|
2189 | 2225 | } else |
---|
2190 | 2226 | if (source == undoButton) |
---|
2191 | 2227 | { |
---|
2192 | | - Undo(); |
---|
| 2228 | + if (!Undo()) |
---|
| 2229 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2193 | 2230 | } else |
---|
2194 | 2231 | if (source == redoButton) |
---|
2195 | 2232 | { |
---|
.. | .. |
---|
2197 | 2234 | } else |
---|
2198 | 2235 | if (source == saveButton) |
---|
2199 | 2236 | { |
---|
2200 | | - Save(); |
---|
| 2237 | + if (!Save(true)) |
---|
| 2238 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2201 | 2239 | } else |
---|
2202 | 2240 | if (source == oneStepButton) |
---|
2203 | 2241 | { |
---|
.. | .. |
---|
2206 | 2244 | } else |
---|
2207 | 2245 | if (source == screenfitButton) |
---|
2208 | 2246 | { |
---|
2209 | | - //Reload(lastConverter, lastFilename, true); |
---|
2210 | 2247 | ScreenFit(); |
---|
2211 | 2248 | } else |
---|
2212 | 2249 | if (source == screenfitpointButton) |
---|
2213 | 2250 | { |
---|
2214 | | - //Reload(lastConverter, lastFilename, true); |
---|
2215 | 2251 | ScreenFitPoint(); |
---|
2216 | 2252 | } else |
---|
2217 | 2253 | if (source == snapobjectButton) |
---|
2218 | 2254 | { |
---|
2219 | | - //Reload(lastConverter, lastFilename, true); |
---|
2220 | 2255 | SnapObject(); |
---|
2221 | 2256 | } else |
---|
2222 | 2257 | // if (event.getSource() == recompileButton) |
---|
.. | .. |
---|
2740 | 2775 | } else |
---|
2741 | 2776 | if (source == ungroupItem || source == ungroupButton) |
---|
2742 | 2777 | { |
---|
2743 | | - //ungroup(); |
---|
| 2778 | + boolean hasRoot = false; |
---|
| 2779 | + |
---|
2744 | 2780 | for (int i=0; i<group.selection.size(); i++) |
---|
2745 | 2781 | { |
---|
2746 | | - Ungroup(group.selection.get(i)); |
---|
| 2782 | + if (group.selection.get(i) == group) |
---|
| 2783 | + { |
---|
| 2784 | + hasRoot = true; |
---|
| 2785 | + break; |
---|
| 2786 | + } |
---|
2747 | 2787 | } |
---|
2748 | 2788 | |
---|
2749 | | - ClearSelection(false); |
---|
2750 | | - |
---|
2751 | | - refreshContents(); |
---|
| 2789 | + if (!hasRoot) |
---|
| 2790 | + { |
---|
| 2791 | + for (int i=0; i<group.selection.size(); i++) |
---|
| 2792 | + { |
---|
| 2793 | + Ungroup(group.selection.get(i)); |
---|
| 2794 | + } |
---|
| 2795 | + |
---|
| 2796 | + ClearSelection(false); |
---|
| 2797 | + |
---|
| 2798 | + refreshContents(); |
---|
| 2799 | + } |
---|
2752 | 2800 | } else |
---|
2753 | 2801 | if (source == genUVItem) |
---|
2754 | 2802 | { |
---|
.. | .. |
---|
3372 | 3420 | //copy.ClearUI(); |
---|
3373 | 3421 | for (Object3D obj : listUI) |
---|
3374 | 3422 | { |
---|
3375 | | - obj.pinned = true; |
---|
| 3423 | + obj.pinned = false; |
---|
3376 | 3424 | obj.CloseUI(); |
---|
3377 | 3425 | } |
---|
3378 | 3426 | listUI.clear(); |
---|
.. | .. |
---|
3457 | 3505 | currentLayout = sevenButton; |
---|
3458 | 3506 | */ |
---|
3459 | 3507 | radio.layout.doClick(); |
---|
| 3508 | + |
---|
| 3509 | + ClearUnpinned(); |
---|
| 3510 | + SetPinStates(group.selection.size() > 0); |
---|
| 3511 | + if (group.selection.size() == 1) |
---|
| 3512 | + EditSelection(false); |
---|
3460 | 3513 | keepparent = group.parent; |
---|
3461 | 3514 | // PARENT = NULL or not??? |
---|
3462 | 3515 | //group.parent = null; // ROOT |
---|
.. | .. |
---|
4616 | 4669 | //new Exception().printStackTrace(); |
---|
4617 | 4670 | |
---|
4618 | 4671 | 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 | | - } |
---|
| 4672 | + ClearUnpinned(); |
---|
4630 | 4673 | |
---|
4631 | 4674 | /**/ |
---|
4632 | 4675 | //switch (event.id) |
---|
.. | .. |
---|
4689 | 4732 | { |
---|
4690 | 4733 | editButton.setEnabled(enabled); |
---|
4691 | 4734 | uneditButton.setEnabled(enabled); |
---|
| 4735 | + unselectButton.setEnabled(enabled); |
---|
| 4736 | + flashSelectionButton.setEnabled(enabled); |
---|
4692 | 4737 | } |
---|
4693 | 4738 | |
---|
4694 | 4739 | void refreshContents(boolean cp) |
---|
4695 | 4740 | { |
---|
4696 | 4741 | if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
4697 | | - if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
| 4742 | + if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4698 | 4743 | { |
---|
4699 | 4744 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4700 | 4745 | |
---|
.. | .. |
---|
4793 | 4838 | |
---|
4794 | 4839 | if (cut) |
---|
4795 | 4840 | { |
---|
4796 | | - if (Globals.SAVEONMAKE) |
---|
4797 | | - Save(); |
---|
| 4841 | +// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save. |
---|
| 4842 | +// Save(); |
---|
4798 | 4843 | //int indices[] = jList.getSelectedIndices(); |
---|
4799 | 4844 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4800 | 4845 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4897 | 4942 | |
---|
4898 | 4943 | void paste(boolean expand) |
---|
4899 | 4944 | { |
---|
| 4945 | + if (Globals.SAVEONMAKE) |
---|
| 4946 | + Save(); |
---|
| 4947 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 4948 | + Globals.SAVEONMAKE = false; |
---|
4900 | 4949 | // if (GrafreeD.clipboard == null) |
---|
4901 | 4950 | // return; |
---|
4902 | 4951 | boolean first = true; |
---|
.. | .. |
---|
4956 | 5005 | Grafreed.clipboard.get(0).parent = keepparent; |
---|
4957 | 5006 | } |
---|
4958 | 5007 | |
---|
| 5008 | + Globals.SAVEONMAKE = keep; |
---|
4959 | 5009 | ResetModel(); |
---|
4960 | 5010 | refreshContents(); |
---|
4961 | 5011 | } |
---|
.. | .. |
---|
5091 | 5141 | |
---|
5092 | 5142 | void group(Object3D csg, boolean grab) |
---|
5093 | 5143 | { |
---|
| 5144 | + if (Globals.SAVEONMAKE) |
---|
| 5145 | + Save(); |
---|
| 5146 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 5147 | + Globals.SAVEONMAKE = false; |
---|
5094 | 5148 | if (//false) // why?? |
---|
5095 | 5149 | !group.selection.isEmpty()) |
---|
5096 | 5150 | { |
---|
.. | .. |
---|
5204 | 5258 | //node.add(csg); |
---|
5205 | 5259 | //makeSomething(node); |
---|
5206 | 5260 | makeSomething(csg); |
---|
| 5261 | + Globals.SAVEONMAKE = keep; |
---|
5207 | 5262 | } |
---|
5208 | 5263 | |
---|
5209 | 5264 | void Ungroup(Object3D g) |
---|
5210 | 5265 | { |
---|
| 5266 | + if (Globals.SAVEONMAKE) |
---|
| 5267 | + Save(); |
---|
| 5268 | + boolean keep = Globals.SAVEONMAKE; |
---|
| 5269 | + Globals.SAVEONMAKE = false; |
---|
5211 | 5270 | if (g instanceof HiddenObject) |
---|
5212 | 5271 | { |
---|
5213 | 5272 | HiddenObject h = (HiddenObject) g; |
---|
.. | .. |
---|
5224 | 5283 | objEditor.makeSomething(g.get(i), false); |
---|
5225 | 5284 | } |
---|
5226 | 5285 | } |
---|
| 5286 | + Globals.SAVEONMAKE = keep; |
---|
5227 | 5287 | } |
---|
5228 | 5288 | |
---|
5229 | 5289 | void ungroup() |
---|
.. | .. |
---|
5514 | 5574 | |
---|
5515 | 5575 | cButton restoreCameraButton; |
---|
5516 | 5576 | |
---|
5517 | | - cButton minButton; |
---|
5518 | | - cButton maxButton; |
---|
5519 | | - cButton fullButton; |
---|
5520 | 5577 | cButton saveButton; |
---|
5521 | 5578 | cButton oneStepButton; |
---|
5522 | 5579 | |
---|