From 239d28bd8c08790bbc513a09b2b869fff862f63f Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 25 Nov 2015 14:24:04 +0000 Subject: [PATCH] JAL-1479 bugfix after decoupling SIFTS preference settings --- src/jalview/bin/Cache.java | 6 ++++++ src/jalview/gui/Preferences.java | 5 +++-- src/jalview/ws/sifts/SiftsClient.java | 8 ++++---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/jalview/bin/Cache.java b/src/jalview/bin/Cache.java index 4ea90e8..67d359a 100755 --- a/src/jalview/bin/Cache.java +++ b/src/jalview/bin/Cache.java @@ -22,6 +22,7 @@ package jalview.bin; import jalview.ws.dbsources.das.api.DasSourceRegistryI; import jalview.ws.dbsources.das.datamodel.DasSourceRegistry; +import jalview.ws.sifts.SiftsSettings; import java.awt.Color; import java.io.BufferedReader; @@ -394,6 +395,10 @@ public class Cache codeInstallation = " (" + codeInstallation + ")"; } new BuildDetails(codeVersion, null, codeInstallation); + + SiftsSettings + .setMapWithSifts(Cache.getDefault("MAP_WITH_SIFTS", false)); + System.out .println("Jalview Version: " + codeVersion + codeInstallation); @@ -407,6 +412,7 @@ public class Cache class VersionChecker extends Thread { + @Override public void run() { String orgtimeout = System diff --git a/src/jalview/gui/Preferences.java b/src/jalview/gui/Preferences.java index 33068a8..c7e1332 100755 --- a/src/jalview/gui/Preferences.java +++ b/src/jalview/gui/Preferences.java @@ -317,14 +317,15 @@ public class Preferences extends GPreferences if (Cache.getDefault("MAP_WITH_SIFTS", false)) { siftsMapping.setSelected(true); - SiftsSettings.setMapWithSifts(true); } else { nwMapping.setSelected(true); - SiftsSettings.setMapWithSifts(false); } + SiftsSettings + .setMapWithSifts(Cache.getDefault("MAP_WITH_SIFTS", false)); + /* * Set Connections tab defaults */ diff --git a/src/jalview/ws/sifts/SiftsClient.java b/src/jalview/ws/sifts/SiftsClient.java index c205e9e..4951d2f 100644 --- a/src/jalview/ws/sifts/SiftsClient.java +++ b/src/jalview/ws/sifts/SiftsClient.java @@ -324,10 +324,10 @@ public class SiftsClient implements SiftsClientI DBRefEntry[] dbRefs = seq.getDBRefs(); if (dbRefs == null || dbRefs.length < 1) { - // final SequenceI[] seqs = new SequenceI[] { seq }; - // new jalview.ws.DBRefFetcher(seqs, null, null, null, false) - // .fetchDBRefs(true); - // dbRefs = seq.getDBRefs(); + final SequenceI[] seqs = new SequenceI[] { seq }; + new jalview.ws.DBRefFetcher(seqs, null, null, null, false) + .fetchDBRefs(true); + dbRefs = seq.getDBRefs(); } if (dbRefs == null || dbRefs.length < 1) -- 1.7.10.2