JAL-2490 findFeaturesAtRes with performant feature lookup
[jalview.git] / src / jalview / renderer / seqfeatures / FeatureRenderer.java
index e62b225..f4648c4 100644 (file)
@@ -301,7 +301,8 @@ public class FeatureRenderer extends FeatureRendererModel
         continue;
       }
 
-      List<SequenceFeature> overlaps = seq.findFeatures(type, startPos, endPos);
+      List<SequenceFeature> overlaps = seq.findFeatures(startPos, endPos,
+              type);
       for (SequenceFeature sequenceFeature : overlaps)
       {
         /*
@@ -379,24 +380,6 @@ public class FeatureRenderer extends FeatureRendererModel
   }
 
   /**
-   * Answers true if the feature belongs to a feature group which is not
-   * currently displayed, else false
-   * 
-   * @param sequenceFeature
-   * @return
-   */
-  protected boolean featureGroupNotShown(
-          final SequenceFeature sequenceFeature)
-  {
-    return featureGroups != null
-            && sequenceFeature.featureGroup != null
-            && sequenceFeature.featureGroup.length() != 0
-            && featureGroups.containsKey(sequenceFeature.featureGroup)
-            && !featureGroups.get(sequenceFeature.featureGroup)
-                    .booleanValue();
-  }
-
-  /**
    * Called when alignment in associated view has new/modified features to
    * discover and display.
    * 
@@ -436,7 +419,7 @@ public class FeatureRenderer extends FeatureRendererModel
         continue;
       }
 
-      List<SequenceFeature> overlaps = seq.findFeatures(type, pos, pos);
+      List<SequenceFeature> overlaps = seq.findFeatures(pos, pos, type);
       for (SequenceFeature sequenceFeature : overlaps)
       {
         if (!featureGroupNotShown(sequenceFeature))