Some reason final radioButtons added to ButtonGroups are reset fixed
authoramwaterhouse <Andrew Waterhouse>
Mon, 27 Nov 2006 11:07:27 +0000 (11:07 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 27 Nov 2006 11:07:27 +0000 (11:07 +0000)
src/jalview/gui/PCAPanel.java
src/jalview/gui/TreePanel.java

index 90cd8e6..d7e0cd7 100755 (executable)
@@ -468,9 +468,11 @@ public class PCAPanel extends GPCAPanel implements Runnable
           associateViewsMenu.add(item);\r
       }\r
 \r
-      final JRadioButtonMenuItem itemf =\r
-          new JRadioButtonMenuItem("All Views", rc.applyToAllViews);\r
+      final JRadioButtonMenuItem itemf = new JRadioButtonMenuItem("All Views");\r
+\r
       buttonGroup.add(itemf);\r
+\r
+      itemf.setSelected(rc.applyToAllViews);\r
       itemf.addActionListener(new ActionListener()\r
       {\r
         public void actionPerformed(ActionEvent evt)\r
index 1f11f4a..f4543ed 100755 (executable)
@@ -198,9 +198,9 @@ public class TreePanel extends GTreePanel
           associateLeavesMenu.add(item);
       }
 
-      final JRadioButtonMenuItem itemf =
-          new JRadioButtonMenuItem("All Views", treeCanvas.applyToAllViews);
+      final JRadioButtonMenuItem itemf = new JRadioButtonMenuItem("All Views");
       buttonGroup.add(itemf);
+      itemf.setSelected(treeCanvas.applyToAllViews);
       itemf.addActionListener(new ActionListener()
       {
         public void actionPerformed(ActionEvent evt)