Correct Preferences to check for SEQUENCE_NAME as well as SEQUENCE_ID on
authorkiramt <k.mourao@dundee.ac.uk>
Mon, 24 Oct 2016 09:38:56 +0000 (10:38 +0100)
committerkiramt <k.mourao@dundee.ac.uk>
Mon, 24 Oct 2016 09:38:56 +0000 (10:38 +0100)
initialisation.

src/jalview/gui/Preferences.java

index b36a73d..b57b951 100755 (executable)
@@ -23,6 +23,7 @@ package jalview.gui;
 import static jalview.util.UrlConstants.EMBLEBI_STRING;
 import static jalview.util.UrlConstants.OLD_EMBLEBI_STRING;
 import static jalview.util.UrlConstants.SEQUENCE_ID;
+import static jalview.util.UrlConstants.SEQUENCE_NAME;
 import static jalview.util.UrlConstants.SRS_STRING;
 
 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
@@ -127,6 +128,10 @@ public class Preferences extends GPreferences
         String url = st.nextToken();
         // check for '|' within a regex
         int rxstart = url.indexOf("$" + SEQUENCE_ID + "$");
+        if (rxstart == -1)
+        {
+          rxstart = url.indexOf("$" + SEQUENCE_NAME + "$");
+        }
         while (rxstart == -1 && url.indexOf("/=$") == -1)
         {
           url = url + "|" + st.nextToken();