From: jprocter Date: Fri, 21 Oct 2011 11:54:18 +0000 (+0100) Subject: (JAL-962) rejig parameter processing order so groups are hidden/shown before features... X-Git-Tag: Archived_Release_2_7~21^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2d6be9a94eb65474a7272d3766881521ed35a760;p=jalview.git (JAL-962) rejig parameter processing order so groups are hidden/shown before features are loaded on to alignment. --- diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 52e7408..562bc92 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -1840,7 +1840,27 @@ public class JalviewLite extends Applet implements } } - String param = applet.getParameter("features"); + // /////////////////////////// + // modify display of features + // we do this before any features have been loaded, ensuring any hidden groups are hidden when features first displayed + // + // hide specific groups + // + String param = applet.getParameter("hidefeaturegroups"); + if (param != null) + { + newAlignFrame.setFeatureGroupState(separatorListToArray(param), false); +// applet.setFeatureGroupStateOn(newAlignFrame, param, false); + } + // show specific groups + param = applet.getParameter("showfeaturegroups"); + if (param != null) + { + newAlignFrame.setFeatureGroupState(separatorListToArray(param), true); +// applet.setFeatureGroupStateOn(newAlignFrame, param, true); + } + // and now load features + param = applet.getParameter("features"); if (param != null) { param = setProtocolState(param); @@ -2059,21 +2079,6 @@ public class JalviewLite extends Applet implements protocols); } - // /////////////////////////// - // modify display of features - // - // hide specific groups - param = applet.getParameter("hidefeaturegroups"); - if (param != null) - { - applet.setFeatureGroupStateOn(newAlignFrame, param, false); - } - // show specific groups - param = applet.getParameter("showfeaturegroups"); - if (param != null) - { - applet.setFeatureGroupStateOn(newAlignFrame, param, true); - } } else {