From 30cd830fcc83edf6fdad4887e9e209d0e20e9246 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 31 Jul 2008 11:00:21 +0000 Subject: [PATCH] use canonical DbSource name in GUI box, and ensure only one instance of DbSourceProxy is presented for each canonical name --- src/jalview/gui/SequenceFetcher.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 -- 1.7.10.2