JAL-2446 add call to SequenceFeatures.delete(); use varargs for type
[jalview.git] / src / jalview / datamodel / Sequence.java
index 5a3ffa4..e1c8566 100755 (executable)
@@ -359,6 +359,14 @@ public class Sequence extends ASequence implements SequenceI
       return;
     }
 
+    /*
+     * new way
+     */
+    sequenceFeatureStore.delete(sf);
+
+    /*
+     * old way - to be removed
+     */
     int index = 0;
     for (index = 0; index < sequenceFeatures.length; index++)
     {
@@ -1488,6 +1496,6 @@ public class Sequence extends ASequence implements SequenceI
     {
       return datasetSequence.findFeatures(type, from, to);
     }
-    return sequenceFeatureStore.findFeatures(type, from, to);
+    return sequenceFeatureStore.findFeatures(from, to, type);
   }
 }