new thread for initting of DBRefFetcher with latest SequenceFetcher
authorjprocter <Jim Procter>
Tue, 26 Aug 2008 10:10:18 +0000 (10:10 +0000)
committerjprocter <Jim Procter>
Tue, 26 Aug 2008 10:10:18 +0000 (10:10 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/PopupMenu.java

index 442a417..648f94c 100755 (executable)
@@ -3552,7 +3552,7 @@ public class AlignFrame
 
       public void actionPerformed(ActionEvent e)
       {
-        javax.swing.SwingUtilities.invokeLater(new Runnable() {
+        new Thread(new Runnable() {
 
           public void run()
           {
@@ -3560,8 +3560,8 @@ public class AlignFrame
                     alignPanel.av.getSequenceSelection(),
                     alignPanel.alignFrame).fetchDBRefs(false);
           }
-          
-        });
+        }).start();
+        
       }
 
     });
index 3aa08aa..056a983 100755 (executable)
@@ -1443,13 +1443,21 @@ public class PopupMenu
 
   public void discoverPDB_actionPerformed()
   {
-    SequenceI[] sequences =
-         ap.av.selectionGroup == null ?
-           new Sequence[]{sequence}
-         : ap.av.selectionGroup.getSequencesInOrder(ap.av.alignment);
-
-    new jalview.ws.DBRefFetcher(sequences,
-        ap.alignFrame).fetchDBRefs(false);
+    
+    final SequenceI[] sequences = 
+      ((ap.av.selectionGroup == null) 
+              ?  new Sequence[]{sequence}
+      : ap.av.selectionGroup.getSequencesInOrder(ap.av.alignment));
+    Thread discpdb = new Thread(new Runnable() {
+      public void run()
+      {
+        
+        new jalview.ws.DBRefFetcher(sequences,
+                ap.alignFrame).fetchDBRefs(false);
+      }
+      
+    });
+    discpdb.start();
   }
 
   public void sequenceFeature_actionPerformed()