JAL-2490 find features for export as GFF, JAL-2548 respect group
[jalview.git] / src / jalview / viewmodel / seqfeatures / FeatureRendererModel.java
index 5bbdbec..a8e8989 100644 (file)
@@ -330,7 +330,16 @@ public abstract class FeatureRendererModel implements
         }
       }
     }
-
+    // <<<<<<< HEAD
+    //
+    // =======
+    // if (minmax == null)
+    // {
+    // minmax = new Hashtable<String, float[][]>();
+    // }
+    //
+    // Set<String> oldGroups = new HashSet<String>(featureGroups.keySet());
+    // >>>>>>> refs/heads/develop
     AlignmentI alignment = av.getAlignment();
     List<String> allfeatures = new ArrayList<String>(); // or HashSet?
 
@@ -339,14 +348,30 @@ public abstract class FeatureRendererModel implements
       SequenceI asq = alignment.getSequenceAt(i);
       for (String group : asq.getFeatures().getFeatureGroups(true))
       {
+        // <<<<<<< HEAD
         /*
          * features in null group are always displayed; other groups
          * keep their current visibility; new groups as 'newMadeVisible'
          */
         boolean groupDisplayed = true;
         if (group != null)
+        // =======
+        // continue;
+        // }
+        //
+        // int index = 0;
+        // while (index < features.length)
+        // {
+        // String fgrp = features[index].getFeatureGroup();
+        // oldGroups.remove(fgrp);
+        // if (!featuresDisplayed.isRegistered(features[index].getType()))
+        // >>>>>>> refs/heads/develop
         {
+          // <<<<<<< HEAD
           if (featureGroups.containsKey(group))
+          // =======
+          // if (fgrp != null)
+          // >>>>>>> refs/heads/develop
           {
             groupDisplayed = featureGroups.get(group);
           }
@@ -373,6 +398,7 @@ public abstract class FeatureRendererModel implements
     }
 
     /*
+    //<<<<<<< HEAD
      * mark any new feature types as visible
      */
     Collections.sort(allfeatures, String.CASE_INSENSITIVE_ORDER);
@@ -386,6 +412,14 @@ public abstract class FeatureRendererModel implements
           setOrder(type, 0);
         }
       }
+      // =======
+      // * oldGroups now consists of groups that no longer
+      // * have any feature in them - remove these
+      // */
+      // for (String grp : oldGroups)
+      // {
+      // featureGroups.remove(grp);
+      // >>>>>>> refs/heads/develop
     }
 
     updateRenderOrder(allfeatures);
@@ -946,23 +980,12 @@ public abstract class FeatureRendererModel implements
   public List<String> getDisplayedFeatureGroups()
   {
     List<String> _gps = new ArrayList<String>();
-    boolean valid = false;
     for (String gp : getFeatureGroups())
     {
       if (checkGroupVisibility(gp, false))
       {
-        valid = true;
         _gps.add(gp);
       }
-      if (!valid)
-      {
-        return null;
-      }
-      else
-      {
-        // gps = new String[_gps.size()];
-        // _gps.toArray(gps);
-      }
     }
     return _gps;
   }