if (mmrange != null)
{
FeatureColourI fc = featureColours.get(oldRender[j]);
- if (fc != null && !fc.isSimpleColour() && fc.isAutoScaled())
+ if (fc != null && !fc.isSimpleColour() && fc.isAutoScaled()
+ && !fc.isColourByAttribute())
{
fc.updateBounds(mmrange[0][0], mmrange[0][1]);
}
if (mmrange != null)
{
FeatureColourI fc = featureColours.get(newf[i]);
- if (fc != null && !fc.isSimpleColour() && fc.isAutoScaled())
+ if (fc != null && !fc.isSimpleColour() && fc.isAutoScaled()
+ && !fc.isColourByAttribute())
{
fc.updateBounds(mmrange[0][0], mmrange[0][1]);
}
*/
protected boolean showFeatureOfType(String type)
{
- return type == null ? false : av.getFeaturesDisplayed().isVisible(type);
+ return type == null ? false : (av.getFeaturesDisplayed() == null ? true
+ : av.getFeaturesDisplayed().isVisible(type));
}
@Override
/**
* Removes from the list of features any that duplicate the location of a
- * feature of the same type (unless feature is filtered out, or a graduated
- * colour scheme or colour by label is applied). Should be used only for
- * features of the same feature colour (which normally implies the same
- * feature type).
+ * 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.
*
* @param features
- * @param fc
*/
- public void filterFeaturesForDisplay(List<SequenceFeature> features,
- FeatureColourI fc)
+ public void filterFeaturesForDisplay(List<SequenceFeature> features)
{
if (features.isEmpty())
{
return;
}
SequenceFeatures.sortFeatures(features, true);
- boolean simpleColour = fc == null || fc.isSimpleColour();
SequenceFeature lastFeature = null;
Iterator<SequenceFeature> it = features.iterator();
* (checking type and isContactFeature as a fail-safe here, although
* currently they are guaranteed to match in this context)
*/
- if (simpleColour)
+ if (lastFeature != null && sf.getBegin() == lastFeature.getBegin()
+ && sf.getEnd() == lastFeature.getEnd()
+ && sf.isContactFeature() == lastFeature.isContactFeature()
+ && sf.getType().equals(lastFeature.getType()))
{
- if (lastFeature != null && sf.getBegin() == lastFeature.getBegin()
- && sf.getEnd() == lastFeature.getEnd()
- && sf.isContactFeature() == lastFeature.isContactFeature()
- && sf.getType().equals(lastFeature.getType()))
- {
- it.remove();
- }
+ it.remove();
}
lastFeature = sf;
}