.. | .. |
---|
207 | 207 | |
---|
208 | 208 | objEditor.ctrlPanel.remove(namePanel); |
---|
209 | 209 | |
---|
210 | | - if (!GroupEditor.allparams) |
---|
| 210 | + if (!allparams) |
---|
211 | 211 | return; |
---|
212 | 212 | |
---|
213 | 213 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
337 | 337 | return frame.action(event, obj); |
---|
338 | 338 | } |
---|
339 | 339 | |
---|
| 340 | + // Cannot work without static |
---|
| 341 | + static boolean allparams = true; |
---|
| 342 | + |
---|
| 343 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 344 | + |
---|
340 | 345 | void SetupMenu() |
---|
341 | 346 | { |
---|
342 | 347 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
.. | .. |
---|
397 | 402 | // } |
---|
398 | 403 | // |
---|
399 | 404 | // materialFlushed = true; |
---|
| 405 | +// } |
---|
| 406 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 407 | +// { |
---|
| 408 | +// if (listUI.size() == 0) |
---|
| 409 | +// EditSelection(false); |
---|
400 | 410 | // } |
---|
401 | 411 | |
---|
402 | 412 | refreshContents(false); // To refresh Info tab |
---|
.. | .. |
---|
723 | 733 | |
---|
724 | 734 | void ToggleFullScreen() |
---|
725 | 735 | { |
---|
726 | | - if (CameraPane.FULLSCREEN) |
---|
| 736 | + cameraView.ToggleFullScreen(); |
---|
| 737 | + |
---|
| 738 | + if (!CameraPane.FULLSCREEN) |
---|
727 | 739 | { |
---|
728 | 740 | device.setFullScreenWindow(null); |
---|
729 | 741 | //frame.setVisible(false); |
---|
.. | .. |
---|
763 | 775 | radio.layout.doClick(); |
---|
764 | 776 | //frame.setVisible(true); |
---|
765 | 777 | } |
---|
766 | | - |
---|
767 | | - cameraView.ToggleFullScreen(); |
---|
768 | 778 | } |
---|
769 | 779 | |
---|
770 | 780 | private JTextPane createTextPane() |
---|
.. | .. |
---|
1102 | 1112 | |
---|
1103 | 1113 | oe.ctrlPanel.Return(); |
---|
1104 | 1114 | |
---|
1105 | | - if (!GroupEditor.allparams) |
---|
| 1115 | + if (!allparams) |
---|
1106 | 1116 | return; |
---|
1107 | 1117 | |
---|
1108 | 1118 | setupPanel = new cGridBag().setVertical(false); |
---|
.. | .. |
---|
1439 | 1449 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1440 | 1450 | //tmp.setName("Edit"); |
---|
1441 | 1451 | objectPanel.add(materialPanel); |
---|
1442 | | - objectPanel.add(toolboxPanel); |
---|
1443 | 1452 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1444 | 1453 | // north.setName("Edit"); |
---|
1445 | 1454 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1446 | 1455 | // objectPanel.add(north); |
---|
1447 | 1456 | objectPanel.add(editPanel); |
---|
1448 | 1457 | objectPanel.add(infoPanel); |
---|
| 1458 | + objectPanel.add(toolboxPanel); |
---|
1449 | 1459 | |
---|
1450 | 1460 | /* |
---|
1451 | 1461 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1454 | 1464 | aConstraints.gridy += 1; |
---|
1455 | 1465 | aConstraints.gridwidth = 1; |
---|
1456 | 1466 | mainPanel.add(objectPanel, aConstraints); |
---|
1457 | | - */ |
---|
| 1467 | + */ |
---|
1458 | 1468 | |
---|
1459 | 1469 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1460 | 1470 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
3527 | 3537 | tab.graphs[i] = null; |
---|
3528 | 3538 | } |
---|
3529 | 3539 | |
---|
| 3540 | + SetUndoStates(); |
---|
| 3541 | + |
---|
3530 | 3542 | // test save |
---|
3531 | 3543 | if (false) |
---|
3532 | 3544 | { |
---|
.. | .. |
---|
3549 | 3561 | |
---|
3550 | 3562 | void CopyChanged(Object3D obj) |
---|
3551 | 3563 | { |
---|
| 3564 | + SetUndoStates(); |
---|
| 3565 | + |
---|
3552 | 3566 | boolean temp = CameraPane.SWITCH; |
---|
3553 | 3567 | CameraPane.SWITCH = false; |
---|
3554 | 3568 | |
---|
.. | .. |
---|
3586 | 3600 | } |
---|
3587 | 3601 | |
---|
3588 | 3602 | refreshContents(); |
---|
| 3603 | + } |
---|
| 3604 | + |
---|
| 3605 | + cButton undoButton; |
---|
| 3606 | + cButton redoButton; |
---|
| 3607 | + |
---|
| 3608 | + void SetUndoStates() |
---|
| 3609 | + { |
---|
| 3610 | + cRadio tab = GetCurrentTab(); |
---|
| 3611 | + |
---|
| 3612 | + undoButton.setEnabled(tab.undoindex > 0); |
---|
| 3613 | + redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null); |
---|
3589 | 3614 | } |
---|
3590 | 3615 | |
---|
3591 | 3616 | public void Undo() |
---|
.. | .. |
---|
4765 | 4790 | String filename = browser.getFile(); |
---|
4766 | 4791 | if (filename != null && filename.length() > 0) |
---|
4767 | 4792 | { |
---|
| 4793 | + if (!filename.endsWith(".gfd")) |
---|
| 4794 | + filename += ".gfd"; |
---|
4768 | 4795 | lastname = browser.getDirectory() + filename; |
---|
4769 | 4796 | save(); |
---|
4770 | 4797 | } |
---|