From b08c4a331a047b06a5e57d01961cec991826876d Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 21 Mar 2005 18:44:46 +0000 Subject: [PATCH] add coloursChanging boolean --- src/jalview/gui/AlignFrame.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index ca9903c..43bdb2f 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -42,7 +42,6 @@ public class AlignFrame extends GAlignFrame viewport.setFont( new Font(fontName,Integer.parseInt(fontStyle),Integer.parseInt(fontSize)) ); - alignPanel = new AlignmentPanel(this, viewport); getContentPane().add(alignPanel, java.awt.BorderLayout.CENTER); @@ -780,6 +779,10 @@ if ( viewport.getConservationSelected() ) protected void conservationMenuItem_actionPerformed(ActionEvent e) { viewport.setConservationSelected(conservationMenuItem.isSelected()); + if(coloursChanging) + return; + + coloursChanging = true; viewport.setAbovePIDThreshold(false); abovePIDThreshold.setSelected(false); @@ -792,11 +795,17 @@ if ( viewport.getConservationSelected() ) changeColour( ((ConservationColourScheme)cs).cs ); else changeColour( cs ); - } + coloursChanging = false; + } + boolean coloursChanging = false; public void abovePIDThreshold_actionPerformed(ActionEvent e) { + if(coloursChanging) + return; + + coloursChanging = true; viewport.setAbovePIDThreshold(abovePIDThreshold.isSelected()); conservationMenuItem.setSelected(false); @@ -813,6 +822,7 @@ if ( viewport.getConservationSelected() ) else changeColour( cs ); + coloursChanging = false; } @@ -1032,7 +1042,7 @@ if ( viewport.getConservationSelected() ) // Need visual-delay indication here. public void run() { - /* jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss(); + jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss(); Vector sv = viewport.getAlignment().getSequences(); SequenceI[] seqs = new SequenceI[sv.size()]; @@ -1083,8 +1093,7 @@ if ( viewport.getConservationSelected() ) /// viewport.getAlignment().getSequences().elementAt(0)); } -*/}} - protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) { + protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) { // Pick the tree file JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. getProperty("LAST_DIRECTORY")); -- 1.7.10.2