JAL-2384 JAL-2371 update ResidueShader on change of colour by
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 5 Apr 2017 15:14:39 +0000 (16:14 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 5 Apr 2017 15:14:39 +0000 (16:14 +0100)
conservation / pid

src/jalview/appletgui/AlignFrame.java

index 65c4fef..2646ede 100644 (file)
@@ -90,7 +90,6 @@ import java.awt.Label;
 import java.awt.Menu;
 import java.awt.MenuBar;
 import java.awt.MenuItem;
-import java.awt.MenuShortcut;
 import java.awt.Panel;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -2690,9 +2689,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     boolean selected = conservationMenuItem.getState();
     modifyConservation.setEnabled(selected);
     viewport.setConservationSelected(selected);
-
-    // viewport.setAbovePIDThreshold(false);
-    // abovePIDThreshold.setState(false);
+    viewport.getResidueShading().setConservationApplied(selected);
 
     changeColour(viewport.getGlobalColourScheme());
 
@@ -2711,8 +2708,11 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     boolean selected = abovePIDThreshold.getState();
     modifyPID.setEnabled(selected);
     viewport.setAbovePIDThreshold(selected);
-    // conservationMenuItem.setState(false);
-    // viewport.setConservationSelected(false);
+    if (!selected)
+    {
+      viewport.getResidueShading().setThreshold(0,
+              viewport.isIgnoreGapsConsensus());
+    }
 
     changeColour(viewport.getGlobalColourScheme());