From: gmungoc Date: Tue, 6 Nov 2018 16:48:46 +0000 (+0000) Subject: JAL-3148 correct features on/off structure when Colour by Sequence X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d33b11cc597fdc17a49c0843d92894da5301ead1;p=jalview.git JAL-3148 correct features on/off structure when Colour by Sequence --- diff --git a/src/jalview/structures/models/AAStructureBindingModel.java b/src/jalview/structures/models/AAStructureBindingModel.java index 0b19d51..a53674f 100644 --- a/src/jalview/structures/models/AAStructureBindingModel.java +++ b/src/jalview/structures/models/AAStructureBindingModel.java @@ -20,6 +20,7 @@ */ package jalview.structures.models; +import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; import jalview.api.SequenceRendererI; import jalview.api.StructureSelectionManagerProvider; @@ -46,8 +47,6 @@ import java.util.Arrays; import java.util.BitSet; import java.util.List; -import org.springframework.web.filter.ShallowEtagHeaderFilter; - /** * * A base class to hold common function for protein structure model binding. @@ -857,6 +856,8 @@ public abstract class AAStructureBindingModel public void colourBySequence(AlignmentViewPanel alignmentv, SequenceRendererI sr, boolean showFeats) { showFeatures = showFeats; + colourBy = ColourBy.Sequence; + if (!isLoadingFinished()) { return; @@ -900,21 +901,24 @@ public void updateColours(Object source) { { return; } - if (!showFeatures && (colourScheme == null || colourScheme.isSimple())) + if (!isColourBySequence() && !showFeatures && + (colourScheme == null || colourScheme.isSimple())) { return; } if (!isLoadingFromArchive()) { + AlignViewportI av = ap.getAlignViewport(); if (isColourBySequence()) { - colourBySequence(ap, new SequenceRenderer(ap.getAlignViewport()), + showFeatures = av.isShowSequenceFeatures(); + colourBySequence(ap, new SequenceRenderer(av), showFeatures); } else { - colourBySequence(ap, new SequenceRenderer(ap.getAlignViewport(), + colourBySequence(ap, new SequenceRenderer(av, colourScheme), showFeatures); } }