JAL-2295 don't copy 'Chimera' features back to Chimera
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 14 Nov 2016 12:30:17 +0000 (12:30 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Mon, 14 Nov 2016 12:30:17 +0000 (12:30 +0000)
src/jalview/ext/rbvi/chimera/ChimeraCommands.java

index 7020f90..533b441 100644 (file)
@@ -400,7 +400,15 @@ public class ChimeraCommands
     for (SequenceFeature sf : sfs)
     {
       String type = sf.getType();
-      if (!visibleFeatures.contains(type) || suppressFeature(type))
+
+      /*
+       * Only copy visible features, don't copy any which originated
+       * from Chimera, and suppress uninteresting ones (e.g. RESNUM)
+       */
+      boolean isFromViewer = JalviewChimeraBinding.CHIMERA_FEATURE_GROUP
+              .equals(sf.getFeatureGroup());
+      if (isFromViewer || !visibleFeatures.contains(type)
+              || suppressFeature(type))
       {
         continue;
       }