(JAL-962) rejig parameter processing order so groups are hidden/shown before features...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 21 Oct 2011 11:54:18 +0000 (12:54 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 21 Oct 2011 11:54:18 +0000 (12:54 +0100)
src/jalview/bin/JalviewLite.java

index 52e7408..562bc92 100644 (file)
@@ -1840,7 +1840,27 @@ public class JalviewLite extends Applet implements
           }\r
         }\r
 \r
-        String param = applet.getParameter("features");\r
+        // ///////////////////////////\r
+        // modify display of features\r
+        // we do this before any features have been loaded, ensuring any hidden groups are hidden when features first displayed\r
+        //\r
+        // hide specific groups\r
+        // \r
+        String param = applet.getParameter("hidefeaturegroups");\r
+        if (param != null)\r
+        {\r
+          newAlignFrame.setFeatureGroupState(separatorListToArray(param), false);        \r
+//          applet.setFeatureGroupStateOn(newAlignFrame, param, false);\r
+        }\r
+        // show specific groups\r
+        param = applet.getParameter("showfeaturegroups");\r
+        if (param != null)\r
+        {\r
+          newAlignFrame.setFeatureGroupState(separatorListToArray(param), true);        \r
+//          applet.setFeatureGroupStateOn(newAlignFrame, param, true);\r
+        }\r
+        // and now load features\r
+        param = applet.getParameter("features");\r
         if (param != null)\r
         {\r
           param = setProtocolState(param);\r
@@ -2059,21 +2079,6 @@ public class JalviewLite extends Applet implements
                   protocols);\r
 \r
         }\r
-        // ///////////////////////////\r
-        // modify display of features\r
-        //\r
-        // hide specific groups\r
-        param = applet.getParameter("hidefeaturegroups");\r
-        if (param != null)\r
-        {\r
-          applet.setFeatureGroupStateOn(newAlignFrame, param, false);\r
-        }\r
-        // show specific groups\r
-        param = applet.getParameter("showfeaturegroups");\r
-        if (param != null)\r
-        {\r
-          applet.setFeatureGroupStateOn(newAlignFrame, param, true);\r
-        }\r
       }\r
       else\r
       {\r