add coloursChanging boolean
authoramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:44:46 +0000 (18:44 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 21 Mar 2005 18:44:46 +0000 (18:44 +0000)
src/jalview/gui/AlignFrame.java

index ca9903c..43bdb2f 100755 (executable)
@@ -42,7 +42,6 @@ public class AlignFrame extends GAlignFrame
       viewport.setFont( new Font(fontName,Integer.parseInt(fontStyle),Integer.parseInt(fontSize)) );\r
 \r
 \r
-\r
     alignPanel = new AlignmentPanel(this, viewport);\r
     getContentPane().add(alignPanel, java.awt.BorderLayout.CENTER);\r
 \r
@@ -780,6 +779,10 @@ if ( viewport.getConservationSelected() )
   protected  void conservationMenuItem_actionPerformed(ActionEvent e)\r
   {\r
     viewport.setConservationSelected(conservationMenuItem.isSelected());\r
+    if(coloursChanging)\r
+      return;\r
+\r
+    coloursChanging = true;\r
 \r
     viewport.setAbovePIDThreshold(false);\r
     abovePIDThreshold.setSelected(false);\r
@@ -792,11 +795,17 @@ if ( viewport.getConservationSelected() )
      changeColour( ((ConservationColourScheme)cs).cs );\r
     else\r
       changeColour( cs );\r
-  }\r
 \r
+    coloursChanging = false;\r
+  }\r
 \r
+  boolean coloursChanging = false;\r
   public void abovePIDThreshold_actionPerformed(ActionEvent e)\r
   {\r
+    if(coloursChanging)\r
+      return;\r
+\r
+    coloursChanging = true;\r
     viewport.setAbovePIDThreshold(abovePIDThreshold.isSelected());\r
 \r
     conservationMenuItem.setSelected(false);\r
@@ -813,6 +822,7 @@ if ( viewport.getConservationSelected() )
     else\r
         changeColour( cs );\r
 \r
+    coloursChanging = false;\r
   }\r
 \r
 \r
@@ -1032,7 +1042,7 @@ if ( viewport.getConservationSelected() )
     // Need visual-delay indication here.\r
     public void run()\r
        {\r
-      /*   jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss();\r
+         jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss();\r
          Vector sv = viewport.getAlignment().getSequences();\r
          SequenceI[] seqs = new SequenceI[sv.size()];\r
 \r
@@ -1083,8 +1093,7 @@ if ( viewport.getConservationSelected() )
     ///                                   viewport.getAlignment().getSequences().elementAt(0));\r
     }\r
 \r
-*/}}\r
-  protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) {\r
+    protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) {\r
     // Pick the tree file\r
     JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache.\r
         getProperty("LAST_DIRECTORY"));\r