From: Jim Procter Date: Sat, 13 Aug 2016 15:57:58 +0000 (+0100) Subject: JAL-2154 ignore all but the primary source resolved during programmatic invocation X-Git-Tag: Release_2_10_0~47^2~4^2~43^2~49 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6bcdb97248adfd9a77bd027973d72f9300d636aa;p=jalview.git JAL-2154 ignore all but the primary source resolved during programmatic invocation --- diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index a9df882..a875053 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -303,13 +303,21 @@ public class SequenceFetcher extends JPanel implements Runnable try { List sp = sfetch.getSourceProxy(selectedDb); - if (sp == null || sp.size() != 1) + for (DbSourceProxy sourcep : sp) + { + if (sourcep.getTier() == 0) + { + database.selection = Arrays + .asList(new DbSourceProxy[] { sourcep }); + break; + } + } + if (database.selection == null || database.selection.size() == 0) { System.err.println("Ignoring fetch parameter db='" + selectedDb + "'"); return false; } - database.selection = sp; textArea.setText(queryString); } catch (Exception q) {