JAL-2490 retrieve visible features only
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 18 May 2017 13:57:37 +0000 (14:57 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 18 May 2017 13:57:37 +0000 (14:57 +0100)
src/jalview/ext/rbvi/chimera/ChimeraCommands.java

index 62aaa1c..e9ce49b 100644 (file)
@@ -411,12 +411,8 @@ public class ChimeraCommands
           StructureMapping mapping, SequenceI seq,
           Map<String, Map<Object, AtomSpecModel>> theMap, int modelNumber)
   {
-    SequenceFeature[] sfs = seq.getSequenceFeatures();
-    if (sfs == null)
-    {
-      return;
-    }
-
+    List<SequenceFeature> sfs = seq.getFeatures().getPositionalFeatures(
+            visibleFeatures.toArray(new String[visibleFeatures.size()]));
     for (SequenceFeature sf : sfs)
     {
       String type = sf.getType();
@@ -427,7 +423,7 @@ public class ChimeraCommands
        */
       boolean isFromViewer = JalviewChimeraBinding.CHIMERA_FEATURE_GROUP
               .equals(sf.getFeatureGroup());
-      if (isFromViewer || !visibleFeatures.contains(type))
+      if (isFromViewer)
       {
         continue;
       }