From: jprocter Date: Thu, 31 Jul 2008 11:00:21 +0000 (+0000) Subject: use canonical DbSource name in GUI box, and ensure only one instance of DbSourceProxy... X-Git-Tag: Release_2_4~74 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=30cd830fcc83edf6fdad4887e9e209d0e20e9246;p=jalview.git use canonical DbSource name in GUI box, and ensure only one instance of DbSourceProxy is presented for each canonical name --- diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 2d0db64..1675304 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -66,9 +66,13 @@ extends JPanel implements Runnable if (!sources.containsValue(dbs[i])) { String name = sfetch.getSourceProxy(dbs[i]).getDbName(); - - sources.put(name, dbs[i]); - database.addItem(name); + // duplicate source names are thrown away, here. + if (!sources.containsKey(name)) + { + database.addItem(name); + } + // overwrite with latest version of the retriever for this source + sources.put(name, dbs[i]); } } try