From: jprocter Date: Tue, 26 Aug 2008 10:10:18 +0000 (+0000) Subject: new thread for initting of DBRefFetcher with latest SequenceFetcher X-Git-Tag: Release_2_4~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=27a5c083838bb51c6d7b60b499e9dade3a33599d;p=jalview.git new thread for initting of DBRefFetcher with latest SequenceFetcher --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 442a417..648f94c 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -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(); + } }); diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index 3aa08aa..056a983 100755 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -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()