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
....@@ -1187,6 +1191,10 @@
11871191 boxButton.setToolTipText("Create box");
11881192 boxButton.addActionListener(this);
11891193
1194
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1195
+ superButton.setToolTipText("Create superellipsoid");
1196
+ superButton.addActionListener(this);
1197
+
11901198 row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11911199 sphereButton.setToolTipText("Create sphere");
11921200 sphereButton.addActionListener(this);
....@@ -1198,10 +1206,6 @@
11981206 row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11991207 torusButton.setToolTipText("Create torus");
12001208 torusButton.addActionListener(this);
1201
-
1202
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1203
- superButton.setToolTipText("Create superellipsoid");
1204
- superButton.addActionListener(this);
12051209
12061210 if (Globals.ADVANCED)
12071211 {
....@@ -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 ??
....@@ -2165,7 +2170,11 @@
21652170 shadow.material = new cMaterial(obj.material);
21662171 shadow.material.diffuse = 0.0001f;
21672172 shadow.material.specular = 0.0001f;
2168
- //shadow.projectedVertices[1].x = 300;
2173
+ shadow.material.opacity = 0.75f;
2174
+
2175
+ AllocProjectedVertices(shadow);
2176
+
2177
+ shadow.projectedVertices[1].x = 300;
21692178
21702179 makeSomething(shadow);
21712180 }
....@@ -4110,7 +4119,10 @@
41104119 copy.versionlist = new Object3D[100];
41114120 copy.versionindex = -1;
41124121
4113
- 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);
41144126 }
41154127
41164128 SetVersionStates();
....@@ -5355,7 +5367,8 @@
53555367 if (group.selection != null)
53565368 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
53575369 {
5358
- if (!(e.nextElement() instanceof Composite))
5370
+ Object next = e.nextElement();
5371
+ if (!(next instanceof Composite)) // || (next instanceof GroupLeaf))
53595372 {
53605373 allComposites = false;
53615374 break;
....@@ -6346,7 +6359,7 @@
63466359 private MenuItem transformGeometryItem;
63476360 private MenuItem transformChildrenItem;
63486361 private MenuItem hideItem;
6349
- private MenuItem grabItem;
6362
+ private JMenuItem grabItem;
63506363 private MenuItem backItem;
63516364 private MenuItem frontItem;
63526365 private MenuItem cameraItem;