X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fviewmodel%2Fseqfeatures%2FFeatureRendererModel.java;h=553f813d5fd08b9010f0084452a7dea262233cdc;hb=0d11e2fa31e8cdacb7424c546b952786e1ca538b;hp=c58461e052b2752b5a919eecdc888aa197b993d9;hpb=ef14d83cfe8ca0bb2271d50d638516cdc90c2b8b;p=jalview.git diff --git a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index c58461e..553f813 100644 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@ -1032,16 +1032,24 @@ public abstract class FeatureRendererModel * Removes from the list of features any that duplicate the location of a * feature of the same type. Should be used only for features of the same, * simple, feature colour (which normally implies the same feature type). Does - * not check visibility settings for feature type or feature group. + * not check visibility settings for feature type or feature group. No + * filtering is done if transparency, or any feature filters, are in force. * * @param features */ public void filterFeaturesForDisplay(List features) { - if (features.isEmpty()) + /* + * don't remove 'redundant' features if + * - transparency is applied (feature count affects depth of feature colour) + * - filters are applied (not all features may be displayable) + */ + if (features.isEmpty() || transparency != 1f + || !featureFilters.isEmpty()) { return; } + SequenceFeatures.sortFeatures(features, true); SequenceFeature lastFeature = null; @@ -1070,7 +1078,7 @@ public abstract class FeatureRendererModel @Override public Map getFeatureFilters() { - return new HashMap<>(featureFilters); + return featureFilters; } @Override @@ -1100,8 +1108,8 @@ public abstract class FeatureRendererModel /** * Answers the colour for the feature, or null if the feature is excluded by - * feature type or group visibility, by filters, or by colour threshold - * settings + * feature group visibility, by filters, or by colour threshold settings. This + * method does not take feature visibility into account. * * @param sf * @param fc @@ -1110,14 +1118,6 @@ public abstract class FeatureRendererModel public Color getColor(SequenceFeature sf, FeatureColourI fc) { /* - * is the feature type displayed? - */ - if (!showFeatureOfType(sf.getType())) - { - return null; - } - - /* * is the feature group displayed? */ if (featureGroupNotShown(sf))