Parse id before url completion
authoramwaterhouse <Andrew Waterhouse>
Wed, 30 Nov 2005 15:37:59 +0000 (15:37 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 30 Nov 2005 15:37:59 +0000 (15:37 +0000)
src/jalview/gui/IdPanel.java
src/jalview/gui/PopupMenu.java

index 2d9c4f3..8ff3df2 100755 (executable)
@@ -164,6 +164,9 @@ public class IdPanel extends JPanel implements MouseListener,
       //DEFAULT LINK IS FIRST IN THE LINK LIST\r
       int seq = av.getIndex(y);\r
       String id = av.getAlignment().getSequenceAt(seq).getName();\r
+      if (id.indexOf("|") > -1)\r
+        id = id.substring(id.lastIndexOf("|") + 1);\r
+\r
 \r
       String url = links.elementAt(0).toString();\r
       url = url.substring(url.indexOf("|")+1);\r
index 7413150..f9e0d19 100755 (executable)
@@ -227,7 +227,7 @@ public class PopupMenu extends JPopupMenu
               id = id.substring(id.lastIndexOf("|")+1);\r
 \r
             final String url = link.substring(link.indexOf("|")+1, link.indexOf("$SEQUENCE_ID$"))\r
-                + sequence.getName() +\r
+                + id +\r
                 link.substring(link.indexOf("$SEQUENCE_ID$") + 13);\r
 \r
 \r