From: gmungoc Date: Wed, 10 Jan 2018 15:17:53 +0000 (+0000) Subject: JAL-2791 ignore feature type visibility in getColor() X-Git-Tag: Release_2_11_0~71 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=274dcb86a3d7ab44e051325b7bd38c5a138bf087;p=jalview.git JAL-2791 ignore feature type visibility in getColor() --- diff --git a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java index 16cb684..e4d9d88 100644 --- a/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java +++ b/src/jalview/viewmodel/seqfeatures/FeatureRendererModel.java @@ -1100,8 +1100,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 +1110,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)) diff --git a/test/jalview/renderer/seqfeatures/FeatureRendererTest.java b/test/jalview/renderer/seqfeatures/FeatureRendererTest.java index 03398c0..cebef11 100644 --- a/test/jalview/renderer/seqfeatures/FeatureRendererTest.java +++ b/test/jalview/renderer/seqfeatures/FeatureRendererTest.java @@ -378,11 +378,12 @@ public class FeatureRendererTest /* * hide feature type, then unhide + * - feature type visibility should not affect the result */ FeatureSettingsBean[] data = new FeatureSettingsBean[1]; data[0] = new FeatureSettingsBean("Cath", fc, null, false); fr.setFeaturePriority(data); - assertNull(fr.getColour(sf1)); + assertEquals(fr.getColour(sf1), Color.red); data[0] = new FeatureSettingsBean("Cath", fc, null, true); fr.setFeaturePriority(data); assertEquals(fr.getColour(sf1), Color.red);