Add links menu if no sequence is selected
authoramwaterhouse <Andrew Waterhouse>
Fri, 11 Aug 2006 16:06:11 +0000 (16:06 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 11 Aug 2006 16:06:11 +0000 (16:06 +0000)
src/jalview/appletgui/APopupMenu.java

index 28e40eb..be4a599 100755 (executable)
@@ -113,6 +113,7 @@ public class APopupMenu
     }\r
     else\r
     {\r
+      remove(hideSeqs);\r
       remove(groupMenu);\r
     }\r
 \r
@@ -143,6 +144,7 @@ public class APopupMenu
         else\r
           url = link.substring(link.lastIndexOf("|")+1);\r
 \r
+        System.out.println("add "+url +" "+target);\r
            item.addActionListener(new java.awt.event.ActionListener()\r
            {\r
                public void actionPerformed(ActionEvent e)\r
@@ -152,7 +154,10 @@ public class APopupMenu
            });\r
           linkMenu.add(item);\r
       }\r
-      seqMenu.add(linkMenu);\r
+      if(seq!=null)\r
+        seqMenu.add(linkMenu);\r
+      else\r
+        add(linkMenu);\r
     }\r
     if(seq!=null)\r
     {\r