JAL-3187 initial refactoring towards peptide variant in tooltip
[jalview.git] / src / jalview / gui / SeqPanel.java
index e7bd200..c648e53 100644 (file)
@@ -910,12 +910,12 @@ public class SeqPanel extends JPanel
                 .findComplementFeaturesAtResidue(ds, pos);
         if (mf != null)
         {
-          List<String> pv = mf.findProteinVariants();
-          for (String s : pv)
+          for (SequenceFeature sf : mf.features)
           {
-            if (!infos.contains(s))
+            String pv = mf.findProteinVariants(sf);
+            if (!infos.contains(pv))
             {
-              infos.addAll(pv);
+              infos.add(pv);
             }
           }
         }
@@ -2254,11 +2254,11 @@ public class SeqPanel extends JPanel
     final int column = pos.column;
     final int seq = pos.seqIndex;
     SequenceI sequence = av.getAlignment().getSequenceAt(seq);
-    List<SequenceFeature> features = ap.getFeatureRenderer()
-            .findFeaturesAtColumn(sequence, column + 1);
-
-    PopupMenu pop = new PopupMenu(ap, sequence, features);
-    pop.show(this, evt.getX(), evt.getY());
+    if (sequence != null)
+    {
+      PopupMenu pop = new PopupMenu(ap, sequence, column);
+      pop.show(this, evt.getX(), evt.getY());
+    }
   }
 
   /**