X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FAlignmentViewport.java;h=b1f595f40a1d74c322246a188759528d9ab60a54;hb=6200addf078b7f7ace90597dc056dafc7fc602c1;hp=ae101a309f4c20d508b0129a596c9bb8516b5d49;hpb=42984135d36f8bb943fc4c20879359d1508bac0f;p=jalview.git diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index ae101a3..b1f595f 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -605,10 +605,30 @@ public abstract class AlignmentViewport protected ColumnSelection colSel = new ColumnSelection(); - public boolean autoCalculateConsensus = true; + protected boolean autoCalculateConsensusAndConservation = true; + + public boolean getAutoCalculateConsensusAndConservation() + { // BH 2019.07.24 + return autoCalculateConsensusAndConservation; + } + + public void setAutoCalculateConsensusAndConservation(boolean b) + { + autoCalculateConsensusAndConservation = b; + } protected boolean autoCalculateStrucConsensus = true; + public boolean getAutoCalculateStrucConsensus() + { // BH 2019.07.24 + return autoCalculateStrucConsensus; + } + + public void setAutoCalculateStrucConsensus(boolean b) + { + autoCalculateStrucConsensus = b; + } + protected boolean ignoreGapsInConsensusCalculation = false; protected ResidueShaderI residueShading = new ResidueShader(); @@ -824,7 +844,7 @@ public abstract class AlignmentViewport // see note in mantis : issue number 8585 if (alignment.isNucleotide() || (conservation == null && quality == null) - || !autoCalculateConsensus) + || !autoCalculateConsensusAndConservation) { return; } @@ -842,7 +862,7 @@ public abstract class AlignmentViewport public void updateConsensus(final AlignmentViewPanel ap) { // see note in mantis : issue number 8585 - if (consensus == null || !autoCalculateConsensus) + if (consensus == null || !autoCalculateConsensusAndConservation) { return; } @@ -1195,6 +1215,13 @@ public abstract class AlignmentViewport public void setSequenceSetId(String newid) { + // // BH 2020.04.07 do we need to do this if it is the same? + // // (Jalview project files) + // if (newid.equals(sequenceSetID)) + // { + // return; + // } + if (sequenceSetID != null) { System.err.println( @@ -1323,21 +1350,6 @@ public abstract class AlignmentViewport */ private boolean followHighlight = true; - // private boolean disableFastPaint; // BH 2019.04.18 - // - // /** - // * BH 2019.04.18 When gap filling is on and a modification is made to fill - // * those, we need to disallow fast painting for paste just once - // * - // * @return - // */ - // public boolean isFastPaintDisabled() - // { - // boolean ret = disableFastPaint; - // disableFastPaint = false; - // return ret; - // } - /** * Property change listener for changes in alignment * @@ -1873,17 +1885,12 @@ public abstract class AlignmentViewport if (isPadGaps()) { alignment.padGaps(); - // if (alignment.padGaps()) - // { - // // the new alignment has been modified -- can't fast paint - // disableFastPaint = true; - // } } - if (autoCalculateConsensus) + if (autoCalculateConsensusAndConservation) { updateConsensus(ap); } - if (hconsensus != null && autoCalculateConsensus) + if (hconsensus != null && autoCalculateConsensusAndConservation) { updateConservation(ap); } @@ -2287,7 +2294,7 @@ public abstract class AlignmentViewport public void clearSequenceColours() { sequenceColours.clear(); - }; + } @Override public AlignViewportI getCodingComplement() @@ -2740,6 +2747,30 @@ public abstract class AlignmentViewport viewStyle.setProteinFontAsCdna(b); } + @Override + public void setShowComplementFeatures(boolean b) + { + viewStyle.setShowComplementFeatures(b); + } + + @Override + public boolean isShowComplementFeatures() + { + return viewStyle.isShowComplementFeatures(); + } + + @Override + public void setShowComplementFeaturesOnTop(boolean b) + { + viewStyle.setShowComplementFeaturesOnTop(b); + } + + @Override + public boolean isShowComplementFeaturesOnTop() + { + return viewStyle.isShowComplementFeaturesOnTop(); + } + /** * @return true if view should scroll to show the highlighted region of a * sequence