.. | .. |
---|
154 | 154 | oe.menuBar.add(menu = new Menu("Edit")); |
---|
155 | 155 | //editItem = menu.add(new MenuItem("Edit")); |
---|
156 | 156 | //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("-"); |
---|
162 | 163 | duplicateItem = menu.add(new MenuItem("Duplicate")); |
---|
163 | 164 | duplicateItem.addActionListener(this); |
---|
164 | 165 | cloneItem = menu.add(new MenuItem("Clone")); |
---|
.. | .. |
---|
202 | 203 | //zBufferItem.addActionListener(this); |
---|
203 | 204 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
204 | 205 | //normalLensItem.addActionListener(this); |
---|
205 | | - cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera")); |
---|
| 206 | + cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint")); |
---|
206 | 207 | revertCameraItem.addActionListener(this); |
---|
207 | 208 | |
---|
208 | 209 | cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
.. | .. |
---|
266 | 267 | // animationItem.addItemListener(this); |
---|
267 | 268 | // animationItem.setState(CameraPane.ANIMATION); |
---|
268 | 269 | cameraMenu.add("-"); |
---|
269 | | - cameraMenu.add(editCameraItem = new MenuItem("Save Camera")); |
---|
| 270 | + cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint")); |
---|
270 | 271 | editCameraItem.addActionListener(this); |
---|
271 | 272 | |
---|
272 | 273 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
555 | 556 | oe.buttonGroup.add(dummyButton); |
---|
556 | 557 | */ |
---|
557 | 558 | //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); |
---|
558 | 571 | |
---|
559 | 572 | oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
560 | 573 | liveCB.setToolTipText("Enable animation"); |
---|
.. | .. |
---|
1956 | 1969 | { |
---|
1957 | 1970 | DumpObject(); |
---|
1958 | 1971 | } 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 |
---|
1959 | 1984 | if (source == oneStepButton) |
---|
1960 | 1985 | { |
---|
1961 | 1986 | Globals.ONESTEP = true; |
---|
.. | .. |
---|
3041 | 3066 | child.CloseUI(); |
---|
3042 | 3067 | listUI.remove(child); |
---|
3043 | 3068 | |
---|
3044 | | - child.editWindow = null; // ??????????? |
---|
| 3069 | + //child.editWindow = null; // ??????????? |
---|
3045 | 3070 | } |
---|
3046 | 3071 | objEditor.ctrlPanel.FlushUI(); |
---|
3047 | 3072 | //objEditor.jTree.clearSelection(); |
---|
.. | .. |
---|
3128 | 3153 | sideView.object = group; |
---|
3129 | 3154 | } |
---|
3130 | 3155 | |
---|
3131 | | -// fix "+" issue group.editWindow = this; |
---|
| 3156 | +// fix "+" issue |
---|
| 3157 | + group.editWindow = this; |
---|
3132 | 3158 | |
---|
3133 | 3159 | /* |
---|
3134 | 3160 | currentLayout = radio.layout; |
---|
.. | .. |
---|
3403 | 3429 | |
---|
3404 | 3430 | int size = obj.MemorySize(); |
---|
3405 | 3431 | |
---|
3406 | | - System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3432 | + //System.err.println((size/1024) + " KB is the size of " + obj); |
---|
| 3433 | + System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)"); |
---|
3407 | 3434 | } |
---|
3408 | 3435 | } |
---|
3409 | 3436 | catch (Exception e) |
---|
.. | .. |
---|
4310 | 4337 | |
---|
4311 | 4338 | objEditor.SetText(); // jan 2014 |
---|
4312 | 4339 | |
---|
4313 | | - Object3D object = (Object3D) tps[0].getLastPathComponent(); |
---|
4314 | | - |
---|
4315 | | - if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(object instanceof Camera)) |
---|
| 4340 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera)) |
---|
4316 | 4341 | CameraPane.flash = true; |
---|
4317 | 4342 | |
---|
4318 | | - if (tps != null && tps.length > 0 && object instanceof Camera) |
---|
| 4343 | + if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
4319 | 4344 | // a camera |
---|
4320 | 4345 | { |
---|
4321 | | - if (object != Globals.theRenderer.LightCamera()) |
---|
| 4346 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) |
---|
4322 | 4347 | { |
---|
4323 | 4348 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4324 | 4349 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
4406 | 4431 | { |
---|
4407 | 4432 | if (group.selection.isEmpty()) |
---|
4408 | 4433 | return; |
---|
| 4434 | + |
---|
4409 | 4435 | Grafreed.clipboardIsTempGroup = false; |
---|
4410 | 4436 | Composite tGroup = null; |
---|
4411 | 4437 | if (group.selection.size() > 0) // 1) |
---|
.. | .. |
---|
4416 | 4442 | |
---|
4417 | 4443 | if (cut) |
---|
4418 | 4444 | { |
---|
| 4445 | + Save(); |
---|
4419 | 4446 | //int indices[] = jList.getSelectedIndices(); |
---|
4420 | 4447 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
4421 | 4448 | //jList.remove(indices[i]); |
---|
.. | .. |
---|
4505 | 4532 | } |
---|
4506 | 4533 | |
---|
4507 | 4534 | } |
---|
| 4535 | + |
---|
4508 | 4536 | if (Grafreed.clipboardIsTempGroup) |
---|
4509 | 4537 | Grafreed.clipboard = tGroup; |
---|
| 4538 | + |
---|
4510 | 4539 | if (cut) |
---|
4511 | 4540 | { |
---|
4512 | 4541 | ResetModel(); |
---|
.. | .. |
---|
5131 | 5160 | cButton clearpanelButton; |
---|
5132 | 5161 | cButton unselectButton; |
---|
5133 | 5162 | |
---|
| 5163 | + cButton saveButton; |
---|
| 5164 | + cButton undoButton; |
---|
| 5165 | + cButton redoButton; |
---|
5134 | 5166 | cButton oneStepButton; |
---|
5135 | 5167 | |
---|
5136 | 5168 | cButton screenfitButton; |
---|