No need to check selection group size
authoramwaterhouse <Andrew Waterhouse>
Mon, 14 Aug 2006 15:10:32 +0000 (15:10 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 14 Aug 2006 15:10:32 +0000 (15:10 +0000)
src/jalview/gui/PopupMenu.java

index 23d04b7..35ca39b 100755 (executable)
@@ -1278,18 +1278,6 @@ public class PopupMenu extends JPopupMenu
 \r
   public void enterPDB_actionPerformed(ActionEvent e)\r
   {\r
-    int size = (ap.av.getSelectionGroup() == null ? 0 :\r
-                ap.av.getSelectionGroup().getSize(false));\r
-\r
-    if (size == 0 || size > 1)\r
-    {\r
-      JOptionPane.showInternalMessageDialog(\r
-          Desktop.desktop,\r
-          "Select a single sequence to specify a PDB id for first",\r
-          "Select Single Selected", JOptionPane.WARNING_MESSAGE);\r
-      return;\r
-    }\r
-\r
     String id = JOptionPane.showInternalInputDialog(Desktop.desktop,\r
         "Enter PDB Id", "Enter PDB Id", JOptionPane.QUESTION_MESSAGE);\r
 \r
@@ -1297,7 +1285,7 @@ public class PopupMenu extends JPopupMenu
     {\r
       PDBEntry entry = new PDBEntry();\r
       entry.setId(id);\r
-      ap.av.getSelectionGroup().getSequenceAt(0).getDatasetSequence()\r
+      sequence.getDatasetSequence()\r
           .addPDBId(entry);\r
     }\r
   }\r