From 27a5c083838bb51c6d7b60b499e9dade3a33599d Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 26 Aug 2008 10:10:18 +0000 Subject: [PATCH] new thread for initting of DBRefFetcher with latest SequenceFetcher --- src/jalview/gui/AlignFrame.java | 6 +++--- src/jalview/gui/PopupMenu.java | 22 +++++++++++++++------- 2 files changed, 18 insertions(+), 10 deletions(-) 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() -- 1.7.10.2