From e010226a8f1496347788042a68131ee97224d0b3 Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 14 May 2012 17:10:54 +0100 Subject: [PATCH] JAL-1097 - ensure replace comma for semicolon always disabled for das sources --- src/jalview/gui/SequenceFetcher.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/jalview/gui/SequenceFetcher.java b/src/jalview/gui/SequenceFetcher.java index 111db90..df955dd 100755 --- a/src/jalview/gui/SequenceFetcher.java +++ b/src/jalview/gui/SequenceFetcher.java @@ -33,6 +33,7 @@ import jalview.io.*; import jalview.util.DBRefUtils; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.seqfetcher.DbSourceProxy; +import jalview.ws.seqfetcher.DbSourceProxyImpl; import java.awt.BorderLayout; @@ -290,7 +291,6 @@ public class SequenceFetcher extends JPanel implements Runnable public void actionPerformed(ActionEvent e) { - DbSourceProxy db = null; try { databaseButt.setText(database.getSelectedItem() @@ -299,7 +299,16 @@ public class SequenceFetcher extends JPanel implements Runnable + " others)" : "")); String eq = database.getExampleQueries(); dbeg.setText("Example query: " + eq); - replacePunctuation.setEnabled(!(eq != null && eq.indexOf(",") > -1)); + boolean enablePunct=!(eq != null && eq.indexOf(",") > -1); + for (DbSourceProxy dbs:database.getSelectedSources()) { + if (dbs instanceof jalview.ws.dbsources.das.datamodel.DasSequenceSource) + { + enablePunct = false; + break; + } + } + replacePunctuation.setEnabled(enablePunct); + } catch (Exception ex) { dbeg.setText(""); -- 1.7.10.2