boolean recalc = false;
if (cs != null)
{
- cs.setConservationApplied(recalc = getConservationSelected());
+ recalc = getConservationSelected();
if (getAbovePIDThreshold() || cs instanceof PIDColourScheme
|| cs instanceof Blosum62ColourScheme)
{
cs.setConsensus(hconsensus);
cs.setConservation(hconservation);
}
+ cs.setConservationApplied(getConservationSelected());
cs.alignmentChanged(alignment, hiddenRepSequences);
}
if (getColourAppliesToAllGroups())
import jalview.datamodel.SequenceI;
import jalview.io.FileLoader;
import jalview.io.FormatAdapter;
+import jalview.schemes.ColourSchemeI;
+import jalview.schemes.PIDColourScheme;
import jalview.structure.StructureSelectionManager;
import jalview.util.MapList;
assertNotNull("Quality in column 1 is null", annotations[0]);
assertTrue("No quality value in column 1", annotations[0].value > 10f);
}
+
+ @Test(groups = { "Functional" })
+ public void testSetGlobalColourScheme()
+ {
+ /*
+ * test for JAL-2283 don't inadvertently turn on colour by conservation
+ */
+ Cache.applicationProperties.setProperty("SHOW_ANNOTATIONS",
+ Boolean.TRUE.toString());
+ Cache.applicationProperties.setProperty("SHOW_CONSERVATION",
+ Boolean.FALSE.toString());
+ Cache.applicationProperties.setProperty("DEFAULT_COLOUR_PROT", "NONE");
+ AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
+ "examples/uniref50.fa", FormatAdapter.FILE);
+ ColourSchemeI cs = new PIDColourScheme();
+ af.getViewport().setGlobalColourScheme(cs);
+ assertFalse(cs.conservationApplied());
+ }
}