Normand Briere
2019-06-11 1d909ffa0c2beb51d453b53b845c4f3a749ca5f0
GroupEditor.java
....@@ -154,11 +154,12 @@
154154 oe.menuBar.add(menu = new Menu("Edit"));
155155 //editItem = menu.add(new MenuItem("Edit"));
156156 //editItem.addActionListener(this);
157
- undoItem = menu.add(new MenuItem("Undo"));
158
- undoItem.addActionListener(this);
159
- redoItem = menu.add(new MenuItem("Redo"));
160
- redoItem.addActionListener(this);
161
- menu.add("-");
157
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
162163 duplicateItem = menu.add(new MenuItem("Duplicate"));
163164 duplicateItem.addActionListener(this);
164165 cloneItem = menu.add(new MenuItem("Clone"));
....@@ -202,7 +203,7 @@
202203 //zBufferItem.addActionListener(this);
203204 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204205 //normalLensItem.addActionListener(this);
205
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera"));
206
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
206207 revertCameraItem.addActionListener(this);
207208
208209 cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
....@@ -266,7 +267,7 @@
266267 // animationItem.addItemListener(this);
267268 // animationItem.setState(CameraPane.ANIMATION);
268269 cameraMenu.add("-");
269
- cameraMenu.add(editCameraItem = new MenuItem("Save Camera"));
270
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
270271 editCameraItem.addActionListener(this);
271272
272273 if (Globals.ADVANCED)
....@@ -555,6 +556,18 @@
555556 oe.buttonGroup.add(dummyButton);
556557 */
557558 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
559
+
560
+ oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ undoButton.setToolTipText("Undo changes");
562
+ undoButton.addActionListener(this);
563
+
564
+ oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ redoButton.setToolTipText("Redo changes");
566
+ redoButton.addActionListener(this);
567
+
568
+ oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
+ saveButton.setToolTipText("Save changes");
570
+ saveButton.addActionListener(this);
558571
559572 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
560573 liveCB.setToolTipText("Enable animation");
....@@ -1956,6 +1969,18 @@
19561969 {
19571970 DumpObject();
19581971 } else
1972
+ if (source == undoButton)
1973
+ {
1974
+ Undo();
1975
+ } else
1976
+ if (source == redoButton)
1977
+ {
1978
+ Redo();
1979
+ } else
1980
+ if (source == saveButton)
1981
+ {
1982
+ Save();
1983
+ } else
19591984 if (source == oneStepButton)
19601985 {
19611986 Globals.ONESTEP = true;
....@@ -3128,7 +3153,8 @@
31283153 sideView.object = group;
31293154 }
31303155
3131
-// fix "+" issue group.editWindow = this;
3156
+// fix "+" issue
3157
+ group.editWindow = this;
31323158
31333159 /*
31343160 currentLayout = radio.layout;
....@@ -4404,6 +4430,7 @@
44044430 {
44054431 if (group.selection.isEmpty())
44064432 return;
4433
+
44074434 Grafreed.clipboardIsTempGroup = false;
44084435 Composite tGroup = null;
44094436 if (group.selection.size() > 0) // 1)
....@@ -4414,6 +4441,7 @@
44144441
44154442 if (cut)
44164443 {
4444
+ Save();
44174445 //int indices[] = jList.getSelectedIndices();
44184446 //for (int i = indices.length - 1; i >= 0; i--)
44194447 //jList.remove(indices[i]);
....@@ -4503,8 +4531,10 @@
45034531 }
45044532
45054533 }
4534
+
45064535 if (Grafreed.clipboardIsTempGroup)
45074536 Grafreed.clipboard = tGroup;
4537
+
45084538 if (cut)
45094539 {
45104540 ResetModel();
....@@ -5129,6 +5159,9 @@
51295159 cButton clearpanelButton;
51305160 cButton unselectButton;
51315161
5162
+ cButton saveButton;
5163
+ cButton undoButton;
5164
+ cButton redoButton;
51325165 cButton oneStepButton;
51335166
51345167 cButton screenfitButton;