Normand Briere
2019-08-16 64e20f390e4b8e58bd0006dde8fa10fba1dac1d5
GroupEditor.java
....@@ -570,9 +570,6 @@
570570 //menu.add("-");
571571 oe.jTree.popup.addSeparator();
572572
573
- deleteItem = oe.jTree.popup.add(new JMenuItem("Delete"));
574
- deleteItem.addActionListener(this);
575
-
576573 if (Globals.ADVANCED)
577574 {
578575 // Deletes the cameras...
....@@ -706,15 +703,17 @@
706703 setMasterItem.addActionListener(this);
707704 }
708705
709
- oe.menuBar.add(menu = new Menu("Group"));
710
-// grabItem = menu.add(new MenuItem("Grab"));
711
-// grabItem.addActionListener(this);
706
+ oe.menuBar.add(menu = new Menu("Order"));
707
+
712708 backItem = menu.add(new MenuItem("Back"));
713709 backItem.addActionListener(this);
714710 frontItem = menu.add(new MenuItem("Front"));
715711 frontItem.addActionListener(this);
716712 // compositeItem = menu.add(new MenuItem("Composite"));
717713 // compositeItem.addActionListener(this);
714
+
715
+ grabItem = oe.jTree.popup.add(new JMenuItem("Group"));
716
+ grabItem.addActionListener(this);
718717
719718 if (Globals.ADVANCED)
720719 {
....@@ -723,6 +722,11 @@
723722 }
724723 ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup"));
725724 ungroupItem.addActionListener(this);
725
+
726
+ oe.jTree.popup.addSeparator();
727
+
728
+ deleteItem = oe.jTree.popup.add(new JMenuItem("Delete"));
729
+ deleteItem.addActionListener(this);
726730
727731 // menu.add("-");
728732 //
....@@ -1065,7 +1069,7 @@
10651069 collapseButton.setToolTipText("Collapse toolbar");
10661070 collapseButton.addActionListener(this);
10671071
1068
- oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1072
+ oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
10691073 maximize3DButton.setToolTipText("Maximize 3D view");
10701074 maximize3DButton.addActionListener(this);
10711075
....@@ -1504,6 +1508,7 @@
15041508
15051509 oe.SetupViews();
15061510
1511
+ if (Globals.DEBUG)
15071512 System.out.println("SetupViews");
15081513 DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer(
15091514 oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ??
....@@ -4114,7 +4119,10 @@
41144119 copy.versionlist = new Object3D[100];
41154120 copy.versionindex = -1;
41164121
4117
- Save(true);
4122
+ // Cannot work with loops
4123
+ // To fix this issue, first mark all nodes above the root,
4124
+ // and check if any of these nodes are reachable below the root.
4125
+ //Save(true);
41184126 }
41194127
41204128 SetVersionStates();
....@@ -5359,7 +5367,8 @@
53595367 if (group.selection != null)
53605368 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
53615369 {
5362
- if (!(e.nextElement() instanceof Composite))
5370
+ Object next = e.nextElement();
5371
+ if (!(next instanceof Composite)) // || (next instanceof GroupLeaf))
53635372 {
53645373 allComposites = false;
53655374 break;
....@@ -6350,7 +6359,7 @@
63506359 private MenuItem transformGeometryItem;
63516360 private MenuItem transformChildrenItem;
63526361 private MenuItem hideItem;
6353
- private MenuItem grabItem;
6362
+ private JMenuItem grabItem;
63546363 private MenuItem backItem;
63556364 private MenuItem frontItem;
63566365 private MenuItem cameraItem;