.. | .. |
---|
15 | 15 | //import javax.swing.plaf.ColorUIResource; |
---|
16 | 16 | //import javax.swing.plaf.metal.DefaultMetalTheme; |
---|
17 | 17 | |
---|
| 18 | +import javax.swing.plaf.basic.BasicSplitPaneDivider; |
---|
| 19 | +import javax.swing.plaf.basic.BasicSplitPaneUI; |
---|
| 20 | + |
---|
18 | 21 | //import javax.media.opengl.GLCanvas; |
---|
19 | 22 | |
---|
20 | 23 | import //weka.core. |
---|
.. | .. |
---|
207 | 210 | |
---|
208 | 211 | objEditor.ctrlPanel.remove(namePanel); |
---|
209 | 212 | |
---|
210 | | - if (!GroupEditor.allparams) |
---|
| 213 | + if (!allparams) |
---|
211 | 214 | return; |
---|
212 | 215 | |
---|
213 | 216 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
306 | 309 | //localCopy.parent = null; |
---|
307 | 310 | |
---|
308 | 311 | frame = new JFrame(); |
---|
309 | | - frame.setUndecorated(true); |
---|
| 312 | + frame.setUndecorated(false); |
---|
310 | 313 | objEditor = this; |
---|
311 | 314 | this.callee = callee; |
---|
312 | 315 | |
---|
.. | .. |
---|
336 | 339 | { |
---|
337 | 340 | return frame.action(event, obj); |
---|
338 | 341 | } |
---|
| 342 | + |
---|
| 343 | + // Cannot work without static |
---|
| 344 | + static boolean allparams = true; |
---|
| 345 | + |
---|
| 346 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
339 | 347 | |
---|
340 | 348 | void SetupMenu() |
---|
341 | 349 | { |
---|
.. | .. |
---|
398 | 406 | // |
---|
399 | 407 | // materialFlushed = true; |
---|
400 | 408 | // } |
---|
| 409 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 410 | +// { |
---|
| 411 | +// if (listUI.size() == 0) |
---|
| 412 | +// EditSelection(false); |
---|
| 413 | +// } |
---|
401 | 414 | |
---|
402 | 415 | refreshContents(false); // To refresh Info tab |
---|
403 | 416 | } |
---|
.. | .. |
---|
436 | 449 | // TEXTAREA infoarea.setLineWrap(true); |
---|
437 | 450 | // TEXTAREA infoarea.setWrapStyleWord(true); |
---|
438 | 451 | infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED); |
---|
439 | | - infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
| 452 | + //infoPanel.setPreferredSize(new Dimension(50, 200)); |
---|
440 | 453 | infoPanel.setName("Info"); |
---|
441 | 454 | //infoPanel.setLayout(new BorderLayout()); |
---|
442 | 455 | //infoPanel.add(createTextPane()); |
---|
.. | .. |
---|
448 | 461 | mainPanel.setDividerSize(9); |
---|
449 | 462 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
450 | 463 | mainPanel.setResizeWeight(0.5); |
---|
451 | | - |
---|
| 464 | + |
---|
| 465 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 466 | + BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 467 | + divider.setDividerSize(15); |
---|
| 468 | + divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 469 | + |
---|
| 470 | + mainPanel.setUI(new BasicSplitPaneUI()); |
---|
| 471 | + |
---|
452 | 472 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
453 | 473 | //mainPanel.setLayout(new GridBagLayout()); |
---|
454 | 474 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
679 | 699 | } |
---|
680 | 700 | } |
---|
681 | 701 | |
---|
682 | | -static GraphicsDevice device = GraphicsEnvironment |
---|
683 | | - .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 702 | +//static GraphicsDevice device = GraphicsEnvironment |
---|
| 703 | +// .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
684 | 704 | |
---|
685 | 705 | Rectangle keeprect; |
---|
686 | 706 | cRadio radio; |
---|
.. | .. |
---|
701 | 721 | void Minimize() |
---|
702 | 722 | { |
---|
703 | 723 | frame.setState(Frame.ICONIFIED); |
---|
| 724 | + frame.validate(); |
---|
704 | 725 | } |
---|
705 | 726 | |
---|
| 727 | +// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={} |
---|
| 728 | +// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={} |
---|
| 729 | +// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={} |
---|
706 | 730 | void Maximize() |
---|
707 | 731 | { |
---|
| 732 | + if (CameraPane.FULLSCREEN) |
---|
| 733 | + { |
---|
| 734 | + ToggleFullScreen(); |
---|
| 735 | + } |
---|
| 736 | + |
---|
708 | 737 | if (maximized) |
---|
709 | 738 | { |
---|
710 | 739 | frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
.. | .. |
---|
712 | 741 | else |
---|
713 | 742 | { |
---|
714 | 743 | keeprect = frame.getBounds(); |
---|
715 | | - Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
716 | | - Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
717 | | - frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 744 | +// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 745 | +// Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 746 | +// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
718 | 747 | // frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 748 | + frame.setBounds(frame.getGraphicsConfiguration().getBounds()); |
---|
719 | 749 | } |
---|
720 | 750 | |
---|
721 | 751 | maximized ^= true; |
---|
| 752 | + |
---|
| 753 | + frame.validate(); |
---|
722 | 754 | } |
---|
| 755 | + |
---|
| 756 | + cButton minButton; |
---|
| 757 | + cButton maxButton; |
---|
| 758 | + cButton fullButton; |
---|
723 | 759 | |
---|
724 | 760 | void ToggleFullScreen() |
---|
725 | 761 | { |
---|
726 | | - if (CameraPane.FULLSCREEN) |
---|
| 762 | +GraphicsDevice device = frame.getGraphicsConfiguration().getDevice(); |
---|
| 763 | + |
---|
| 764 | + cameraView.ToggleFullScreen(); |
---|
| 765 | + |
---|
| 766 | + if (!CameraPane.FULLSCREEN) |
---|
727 | 767 | { |
---|
728 | 768 | device.setFullScreenWindow(null); |
---|
| 769 | + frame.dispose(); |
---|
| 770 | + frame.setUndecorated(false); |
---|
| 771 | + frame.validate(); |
---|
| 772 | + frame.setVisible(true); |
---|
| 773 | + |
---|
729 | 774 | //frame.setVisible(false); |
---|
730 | 775 | // frame.removeNotify(); |
---|
731 | 776 | // frame.setUndecorated(false); |
---|
.. | .. |
---|
750 | 795 | // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
751 | 796 | // frame.getToolkit().getScreenSize().height); |
---|
752 | 797 | //frame.setVisible(false); |
---|
| 798 | + |
---|
| 799 | + frame.dispose(); |
---|
| 800 | + frame.setUndecorated(true); |
---|
753 | 801 | device.setFullScreenWindow(frame); |
---|
| 802 | + frame.validate(); |
---|
| 803 | + frame.setVisible(true); |
---|
754 | 804 | // frame.removeNotify(); |
---|
755 | 805 | // frame.setUndecorated(true); |
---|
756 | 806 | // frame.addNotify(); |
---|
.. | .. |
---|
763 | 813 | radio.layout.doClick(); |
---|
764 | 814 | //frame.setVisible(true); |
---|
765 | 815 | } |
---|
766 | | - |
---|
767 | | - cameraView.ToggleFullScreen(); |
---|
| 816 | + frame.validate(); |
---|
768 | 817 | } |
---|
769 | 818 | |
---|
770 | 819 | private JTextPane createTextPane() |
---|
.. | .. |
---|
1097 | 1146 | namePanel = new cGridBag(); |
---|
1098 | 1147 | |
---|
1099 | 1148 | nameField = AddText(namePanel, copy.GetName()); |
---|
1100 | | - namePanel.add(nameField); |
---|
| 1149 | + namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER)); |
---|
1101 | 1150 | oe.ctrlPanel.add(namePanel); |
---|
1102 | 1151 | |
---|
1103 | 1152 | oe.ctrlPanel.Return(); |
---|
1104 | 1153 | |
---|
1105 | | - if (!GroupEditor.allparams) |
---|
| 1154 | + if (!allparams) |
---|
1106 | 1155 | return; |
---|
1107 | 1156 | |
---|
1108 | 1157 | setupPanel = new cGridBag().setVertical(false); |
---|
.. | .. |
---|
1115 | 1164 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1116 | 1165 | hideCB.setToolTipText("Hide object"); |
---|
1117 | 1166 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1118 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1167 | + markCB.setToolTipText("As animation target transform"); |
---|
1119 | 1168 | |
---|
1120 | 1169 | setupPanel2 = new cGridBag().setVertical(false); |
---|
1121 | 1170 | |
---|
1122 | 1171 | rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
1123 | 1172 | rewindCB.setToolTipText("Rewind animation"); |
---|
1124 | 1173 | |
---|
1125 | | - randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
1126 | | - randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
| 1174 | + randomCB = AddCheckBox(setupPanel2, "Random", copy.random); |
---|
| 1175 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
1127 | 1176 | |
---|
1128 | 1177 | if (Globals.ADVANCED) |
---|
1129 | 1178 | { |
---|
.. | .. |
---|
1439 | 1488 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1440 | 1489 | //tmp.setName("Edit"); |
---|
1441 | 1490 | objectPanel.add(materialPanel); |
---|
1442 | | - objectPanel.add(toolboxPanel); |
---|
1443 | 1491 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1444 | 1492 | // north.setName("Edit"); |
---|
1445 | 1493 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1446 | 1494 | // objectPanel.add(north); |
---|
1447 | 1495 | objectPanel.add(editPanel); |
---|
1448 | 1496 | objectPanel.add(infoPanel); |
---|
| 1497 | + objectPanel.add(toolboxPanel); |
---|
1449 | 1498 | |
---|
1450 | 1499 | /* |
---|
1451 | 1500 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1454 | 1503 | aConstraints.gridy += 1; |
---|
1455 | 1504 | aConstraints.gridwidth = 1; |
---|
1456 | 1505 | mainPanel.add(objectPanel, aConstraints); |
---|
1457 | | - */ |
---|
| 1506 | + */ |
---|
1458 | 1507 | |
---|
1459 | 1508 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1460 | 1509 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1574 | 1623 | |
---|
1575 | 1624 | frame.setSize(1280, 860); |
---|
1576 | 1625 | |
---|
1577 | | - frame.validate(); |
---|
1578 | | - frame.setVisible(true); |
---|
1579 | | - |
---|
1580 | 1626 | cameraView.requestFocusInWindow(); |
---|
1581 | 1627 | |
---|
1582 | 1628 | gridPanel.setDividerLocation(1.0); |
---|
| 1629 | + |
---|
| 1630 | + frame.validate(); |
---|
| 1631 | + |
---|
| 1632 | + frame.setVisible(true); |
---|
1583 | 1633 | |
---|
1584 | 1634 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
1585 | 1635 | frame.addWindowListener(new WindowAdapter() |
---|
.. | .. |
---|
1666 | 1716 | texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1667 | 1717 | colorSection.add(texture); |
---|
1668 | 1718 | |
---|
1669 | | - cGridBag anisoU = new cGridBag(); |
---|
1670 | | - anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
1671 | | - anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1672 | | - anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1673 | | - colorSection.add(anisoU); |
---|
1674 | | - |
---|
1675 | | - cGridBag anisoV = new cGridBag(); |
---|
1676 | | - anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
1677 | | - anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1678 | | - anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1679 | | - colorSection.add(anisoV); |
---|
1680 | | - |
---|
1681 | | - cGridBag shadowbias = new cGridBag(); |
---|
1682 | | - shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
1683 | | - shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1684 | | - shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1685 | | - colorSection.add(shadowbias); |
---|
1686 | | - |
---|
1687 | 1719 | panel.add(new JSeparator()); |
---|
1688 | 1720 | |
---|
1689 | 1721 | panel.add(colorSection); |
---|
.. | .. |
---|
1733 | 1765 | fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1734 | 1766 | fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1735 | 1767 | diffuseSection.add(fakedepth); |
---|
| 1768 | + |
---|
| 1769 | + cGridBag shadowbias = new cGridBag(); |
---|
| 1770 | + shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints); |
---|
| 1771 | + shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1772 | + shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
| 1773 | + diffuseSection.add(shadowbias); |
---|
1736 | 1774 | |
---|
1737 | 1775 | panel.add(new JSeparator()); |
---|
1738 | 1776 | |
---|
.. | .. |
---|
1784 | 1822 | // aConstraints.gridy += 1; |
---|
1785 | 1823 | // aConstraints.gridwidth = 1; |
---|
1786 | 1824 | |
---|
| 1825 | + cGridBag anisoU = new cGridBag(); |
---|
| 1826 | + anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints); |
---|
| 1827 | + anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1828 | + anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1829 | + specularSection.add(anisoU); |
---|
| 1830 | + |
---|
| 1831 | + cGridBag anisoV = new cGridBag(); |
---|
| 1832 | + anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints); |
---|
| 1833 | + anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
| 1834 | + anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
| 1835 | + specularSection.add(anisoV); |
---|
| 1836 | + |
---|
1787 | 1837 | |
---|
1788 | 1838 | panel.add(new JSeparator()); |
---|
1789 | 1839 | |
---|
.. | .. |
---|
1791 | 1841 | |
---|
1792 | 1842 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1793 | 1843 | |
---|
1794 | | - cGridBag globalSection = new cGridBag().setVertical(true); |
---|
| 1844 | + //cGridBag globalSection = new cGridBag().setVertical(true); |
---|
1795 | 1845 | |
---|
1796 | 1846 | cGridBag camera = new cGridBag(); |
---|
1797 | 1847 | camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints); |
---|
1798 | 1848 | cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1799 | 1849 | camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1800 | | - globalSection.add(camera); |
---|
| 1850 | + colorSection.add(camera); |
---|
1801 | 1851 | |
---|
1802 | 1852 | cGridBag ambient = new cGridBag(); |
---|
1803 | 1853 | ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints); |
---|
1804 | 1854 | ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1805 | 1855 | ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1806 | | - globalSection.add(ambient); |
---|
| 1856 | + colorSection.add(ambient); |
---|
1807 | 1857 | |
---|
1808 | 1858 | cGridBag backlit = new cGridBag(); |
---|
1809 | 1859 | backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints); |
---|
1810 | 1860 | backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1811 | 1861 | backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints); |
---|
1812 | | - globalSection.add(backlit); |
---|
| 1862 | + colorSection.add(backlit); |
---|
1813 | 1863 | |
---|
1814 | 1864 | cGridBag opacity = new cGridBag(); |
---|
1815 | 1865 | opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints); |
---|
1816 | 1866 | opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
1817 | 1867 | opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints); |
---|
1818 | | - globalSection.add(opacity); |
---|
| 1868 | + colorSection.add(opacity); |
---|
1819 | 1869 | |
---|
1820 | | - panel.add(new JSeparator()); |
---|
| 1870 | + //panel.add(new JSeparator()); |
---|
1821 | 1871 | |
---|
1822 | | - panel.add(globalSection); |
---|
| 1872 | + //panel.add(globalSection); |
---|
1823 | 1873 | |
---|
1824 | 1874 | //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints); |
---|
1825 | 1875 | |
---|
.. | .. |
---|
3007 | 3057 | // } |
---|
3008 | 3058 | |
---|
3009 | 3059 | /**/ |
---|
3010 | | - if (deselect) |
---|
| 3060 | + if (deselect || child == null) |
---|
3011 | 3061 | { |
---|
3012 | 3062 | //group.deselectAll(); |
---|
3013 | 3063 | //freeze = true; |
---|
3014 | 3064 | GetTree().clearSelection(); |
---|
3015 | 3065 | //freeze = false; |
---|
| 3066 | + |
---|
| 3067 | + if (child == null) |
---|
| 3068 | + { |
---|
| 3069 | + return; |
---|
| 3070 | + } |
---|
3016 | 3071 | } |
---|
3017 | 3072 | |
---|
3018 | 3073 | //group.addSelectee(child); |
---|
.. | .. |
---|
3513 | 3568 | |
---|
3514 | 3569 | copy.ExtractBigData(hashtable); |
---|
3515 | 3570 | |
---|
| 3571 | + byte[] compress = Compress(copy); |
---|
| 3572 | + |
---|
3516 | 3573 | //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
3517 | | - tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3574 | + tab.graphs[tab.undoindex++] = compress; |
---|
3518 | 3575 | |
---|
3519 | 3576 | copy.RestoreBigData(hashtable); |
---|
3520 | 3577 | |
---|
.. | .. |
---|
3527 | 3584 | tab.graphs[i] = null; |
---|
3528 | 3585 | } |
---|
3529 | 3586 | |
---|
| 3587 | + SetUndoStates(); |
---|
| 3588 | + |
---|
3530 | 3589 | // test save |
---|
3531 | 3590 | if (false) |
---|
3532 | 3591 | { |
---|
.. | .. |
---|
3549 | 3608 | |
---|
3550 | 3609 | void CopyChanged(Object3D obj) |
---|
3551 | 3610 | { |
---|
| 3611 | + SetUndoStates(); |
---|
| 3612 | + |
---|
3552 | 3613 | boolean temp = CameraPane.SWITCH; |
---|
3553 | 3614 | CameraPane.SWITCH = false; |
---|
3554 | 3615 | |
---|
.. | .. |
---|
3586 | 3647 | } |
---|
3587 | 3648 | |
---|
3588 | 3649 | refreshContents(); |
---|
| 3650 | + } |
---|
| 3651 | + |
---|
| 3652 | + cButton undoButton; |
---|
| 3653 | + cButton redoButton; |
---|
| 3654 | + |
---|
| 3655 | + void SetUndoStates() |
---|
| 3656 | + { |
---|
| 3657 | + cRadio tab = GetCurrentTab(); |
---|
| 3658 | + |
---|
| 3659 | + undoButton.setEnabled(tab.undoindex > 0); |
---|
| 3660 | + redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null); |
---|
3589 | 3661 | } |
---|
3590 | 3662 | |
---|
3591 | 3663 | public void Undo() |
---|
.. | .. |
---|
4765 | 4837 | String filename = browser.getFile(); |
---|
4766 | 4838 | if (filename != null && filename.length() > 0) |
---|
4767 | 4839 | { |
---|
| 4840 | + if (!filename.endsWith(".gfd")) |
---|
| 4841 | + filename += ".gfd"; |
---|
4768 | 4842 | lastname = browser.getDirectory() + filename; |
---|
4769 | 4843 | save(); |
---|
4770 | 4844 | } |
---|