Normand Briere
2018-12-15 6ed65dcb597fb2153cef75bf1845978f1115658c
GroupEditor.java
....@@ -520,6 +520,9 @@
520520
521521 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
522522 flashSelectionButton.addActionListener(this);
523
+
524
+ oe.toolbarPanel.add(new cButton(" ", false));
525
+
523526 oe.aConstraints.gridx += 1;
524527 oe.aConstraints.weighty = 0;
525528 oe.aConstraints.gridwidth = 1;
....@@ -646,14 +649,14 @@
646649
647650 void EditObject(Object3D obj)
648651 {
649
- cRadio dummyButton = new cRadio(obj.name);
650
- dummyButton.SetObject(obj);
651
- dummyButton.layout = sevenButton;
652
- dummyButton.SetCamera(cameraView.renderCamera, false);
653
- dummyButton.addActionListener(this);
654
- radioPanel.add(dummyButton);
655
- buttonGroup.add(dummyButton);
656
- dummyButton.doClick();
652
+ cRadio radioButton = new cRadio(obj.name);
653
+ radioButton.SetObject(obj);
654
+ radioButton.layout = sevenButton;
655
+ radioButton.SetCamera(cameraView.renderCamera, false);
656
+ radioButton.addActionListener(this);
657
+ radioPanel.add(radioButton);
658
+ buttonGroup.add(radioButton);
659
+ radioButton.doClick();
657660 }
658661 void SetupViews(ObjEditor oe)
659662 {
....@@ -715,8 +718,7 @@
715718 dropAttributes |= Object3D.TEXTURE;
716719 else
717720 dropAttributes &= ~Object3D.TEXTURE;
718
- }
719
- else if(e.getSource() == liveCB)
721
+ } else if(e.getSource() == liveCB)
720722 {
721723 cameraView.ToggleLive();
722724 }
....@@ -1118,6 +1120,8 @@
11181120 resetParentItem.addActionListener(this);
11191121 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11201122 repairParentItem.addActionListener(this);
1123
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1124
+ repairShadowItem.addActionListener(this);
11211125 menu.add(invariantsItem = new MenuItem("Invariants"));
11221126 invariantsItem.addActionListener(this);
11231127 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -2543,6 +2547,20 @@
25432547
25442548 refreshContents();
25452549 } else
2550
+ if (event.getSource() == repairShadowItem)
2551
+ {
2552
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2553
+ {
2554
+ Object3D obj = (Object3D)e.nextElement();
2555
+ obj.RepairShadow();
2556
+// for (int i=0; i<obj.size(); i++)
2557
+// {
2558
+// obj.get(i).parent = obj;
2559
+// }
2560
+ }
2561
+
2562
+ refreshContents();
2563
+ } else
25462564 if (event.getSource() == sortbysizeItem)
25472565 {
25482566 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2639,7 +2657,7 @@
26392657 //gridPanel.setDividerLocation(1.0);
26402658 //bigPanel.setDividerLocation(0.0);
26412659 bigThree.remove(scenePanel);
2642
- bigThree.remove(cameraPanel);
2660
+ bigThree.remove(centralPanel);
26432661 bigThree.remove(XYZPanel);
26442662 aWindowConstraints.gridx = 0;
26452663 aWindowConstraints.gridy = 0;
....@@ -2654,7 +2672,7 @@
26542672 // aConstraints.gridheight = 3;
26552673 aWindowConstraints.gridx = 1;
26562674 aWindowConstraints.fill = GridBagConstraints.BOTH;
2657
- bigThree.add(cameraPanel, aWindowConstraints);
2675
+ bigThree.add(centralPanel, aWindowConstraints);
26582676 aWindowConstraints.weightx = 0;
26592677 aWindowConstraints.gridx = 4;
26602678 aWindowConstraints.gridwidth = 1;
....@@ -2667,7 +2685,7 @@
26672685 {
26682686 radio.layout = threeButton;
26692687 bigThree.remove(scenePanel);
2670
- bigThree.remove(cameraPanel);
2688
+ bigThree.remove(centralPanel);
26712689 bigThree.remove(XYZPanel);
26722690 aWindowConstraints.gridx = 0;
26732691 aWindowConstraints.gridy = 0;
....@@ -2682,7 +2700,7 @@
26822700 // aConstraints.gridheight = 3;
26832701 aWindowConstraints.gridx = 1;
26842702 aWindowConstraints.fill = GridBagConstraints.BOTH;
2685
- bigThree.add(cameraPanel, aWindowConstraints);
2703
+ bigThree.add(centralPanel, aWindowConstraints);
26862704 aWindowConstraints.weightx = 0;
26872705 aWindowConstraints.gridx = 4;
26882706 aWindowConstraints.gridwidth = 1;
....@@ -2695,7 +2713,7 @@
26952713 {
26962714 radio.layout = fourButton;
26972715 bigThree.remove(scenePanel);
2698
- bigThree.remove(cameraPanel);
2716
+ bigThree.remove(centralPanel);
26992717 bigThree.remove(XYZPanel);
27002718 aWindowConstraints.gridx = 0;
27012719 aWindowConstraints.gridy = 0;
....@@ -2723,7 +2741,7 @@
27232741 {
27242742 radio.layout = sixButton;
27252743 bigThree.remove(scenePanel);
2726
- bigThree.remove(cameraPanel);
2744
+ bigThree.remove(centralPanel);
27272745 bigThree.remove(XYZPanel);
27282746 aWindowConstraints.gridx = 0;
27292747 aWindowConstraints.gridy = 0;
....@@ -2738,7 +2756,7 @@
27382756 // aWindowConstraints.gridheight = 3;
27392757 aWindowConstraints.gridx = 1;
27402758 aWindowConstraints.fill = GridBagConstraints.BOTH;
2741
- bigThree.add(cameraPanel, aWindowConstraints);
2759
+ bigThree.add(centralPanel, aWindowConstraints);
27422760 aWindowConstraints.weightx = 0;
27432761 aWindowConstraints.gridx = 4;
27442762 aWindowConstraints.gridwidth = 1;
....@@ -2751,7 +2769,7 @@
27512769 {
27522770 radio.layout = sevenButton;
27532771 bigThree.remove(scenePanel);
2754
- bigThree.remove(cameraPanel);
2772
+ bigThree.remove(centralPanel);
27552773 bigThree.remove(XYZPanel);
27562774 aWindowConstraints.gridx = 0;
27572775 aWindowConstraints.gridy = 0;
....@@ -2766,7 +2784,7 @@
27662784 // aWindowConstraints.gridheight = 3;
27672785 aWindowConstraints.gridx = 1;
27682786 aWindowConstraints.fill = GridBagConstraints.BOTH;
2769
- bigThree.add(cameraPanel, aWindowConstraints);
2787
+ bigThree.add(centralPanel, aWindowConstraints);
27702788 aWindowConstraints.weightx = 0;
27712789 aWindowConstraints.gridx = 4;
27722790 aWindowConstraints.gridwidth = 1;
....@@ -5007,6 +5025,7 @@
50075025
50085026 private MenuItem resetParentItem;
50095027 private MenuItem repairParentItem;
5028
+ private MenuItem repairShadowItem;
50105029 private MenuItem sortbysizeItem;
50115030 private MenuItem sortbynameItem;
50125031