X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FAlignmentViewport.java;h=08af2ec58a74eb6622715bcac7792b3483a52630;hb=57738a1f3c19b1c3a00bd3ac5108f8cd0af32f99;hp=f2ab8a6a883044c20943dc8082cbd62d11afae9f;hpb=b1f1dafab890809e47d9b3e7b54aa300ebe6d7a1;p=jalview.git diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index f2ab8a6..08af2ec 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -664,8 +664,7 @@ public abstract class AlignmentViewport * retain any colour thresholds per group while * changing choice of colour scheme (JAL-2386) */ - sg.setColourScheme( - cs == null ? null : cs.getInstance(this, sg)); + sg.setColourScheme(cs == null ? null : cs.getInstance(this, sg)); if (cs != null) { sg.getGroupColourScheme().alignmentChanged(sg, @@ -963,6 +962,7 @@ public abstract class AlignmentViewport ranges = null; currentTree = null; selectionGroup = null; + colSel = null; setAlignment(null); } @@ -1323,21 +1323,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 * @@ -1835,9 +1820,8 @@ public abstract class AlignmentViewport AlignmentAnnotation clone = new AlignmentAnnotation(annot); if (selectedOnly && selectionGroup != null) { - clone.makeVisibleAnnotation( - selectionGroup.getStartRes(), selectionGroup.getEndRes(), - alignment.getHiddenColumns()); + clone.makeVisibleAnnotation(selectionGroup.getStartRes(), + selectionGroup.getEndRes(), alignment.getHiddenColumns()); } else { @@ -1872,11 +1856,7 @@ public abstract class AlignmentViewport { if (isPadGaps()) { - if (alignment.padGaps()) - { - // the new alignment has been modified -- can't fast paint - disableFastPaint = true; - } + alignment.padGaps(); } if (autoCalculateConsensus) { @@ -2286,7 +2266,7 @@ public abstract class AlignmentViewport public void clearSequenceColours() { sequenceColours.clear(); - }; + } @Override public AlignViewportI getCodingComplement() @@ -2739,6 +2719,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 @@ -2981,7 +2985,8 @@ public abstract class AlignmentViewport } @Override - public AlignmentExportData getAlignExportData(AlignExportSettingsI options) + public AlignmentExportData getAlignExportData( + AlignExportSettingsI options) { AlignmentI alignmentToExport = null; String[] omitHidden = null; @@ -3009,7 +3014,7 @@ public abstract class AlignmentViewport omitHidden, alignmentStartEnd); return ed; } - + /** * flag set to indicate if structure views might be out of sync with sequences * in the alignment @@ -3073,4 +3078,22 @@ public abstract class AlignmentViewport codingComplement.setUpdateStructures(needToUpdateStructureViews); } } + + @Override + public Iterator getViewAsVisibleContigs(boolean selectedRegionOnly) + { + int start = 0; + int end = 0; + if (selectedRegionOnly && selectionGroup != null) + { + start = selectionGroup.getStartRes(); + end = selectionGroup.getEndRes() + 1; + } + else + { + end = alignment.getWidth(); + } + return (alignment.getHiddenColumns().getVisContigsIterator(start, end, + false)); + } }