From 2d6be9a94eb65474a7272d3766881521ed35a760 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 21 Oct 2011 12:54:18 +0100 Subject: [PATCH] (JAL-962) rejig parameter processing order so groups are hidden/shown before features are loaded on to alignment. --- src/jalview/bin/JalviewLite.java | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) 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 { -- 1.7.10.2