fix for JAL-888
authorjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 17 Aug 2011 11:15:36 +0000 (12:15 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 17 Aug 2011 11:15:36 +0000 (12:15 +0100)
src/jalview/gui/WsPreferences.java

index ff149c1..e14b358 100644 (file)
@@ -159,6 +159,10 @@ public class WsPreferences extends GWsPreferences
   {
     if (old)
     {
+      if (oldUrls!=wsUrls || (wsUrls!=null && oldUrls!=null && !wsUrls.equals(oldUrls)))
+      {
+        update++;
+      }
       wsUrls = (oldUrls == null) ? null : new Vector(oldUrls);
     }
     else
@@ -419,8 +423,14 @@ public class WsPreferences extends GWsPreferences
   protected void resetWs_actionPerformed(ActionEvent e)
   {
     jalview.ws.jws2.Jws2Discoverer.setServiceUrls(null);
-    wsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
+    Vector nwsUrls = jalview.ws.jws2.Jws2Discoverer.getServiceUrls();
+    if (!wsUrls.equals(nwsUrls)) {
+      update++;
+    }
+    wsUrls=nwsUrls;
     updateList();
+    
+    updateAndRefreshWsMenuConfig(true);
   }
 
   protected void ok_ActionPerformed(ActionEvent e)