From fbd9d289540651ce1012c08e37d04e42e4c9d568 Mon Sep 17 00:00:00 2001 From: Benedikt Seidl Date: Thu, 19 Sep 2024 16:10:22 +0200 Subject: [PATCH] Remove global showOnlyLayerGroups option --- plugins/LayerTree.jsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/LayerTree.jsx b/plugins/LayerTree.jsx index 9432a3e68..bcc15757f 100644 --- a/plugins/LayerTree.jsx +++ b/plugins/LayerTree.jsx @@ -226,8 +226,7 @@ class LayerTree extends React.Component { checkboxstate = 'radio_' + checkboxstate; } const expanderstate = group.expanded ? 'tree_minus' : 'tree_plus'; - const onlyGroups = ConfigUtils.getConfigProp("showOnlyLayerGroups", this.props.theme) || this.props.onlyGroups; - const showExpander = !onlyGroups || (group.sublayers || []).some((sublayer) => sublayer.sublayers); + const showExpander = !this.props.onlyGroups || (group.sublayers || []).some((sublayer) => sublayer.sublayers); const itemclasses = { "layertree-item": true, "layertree-item-disabled": (!this.props.groupTogglesSublayers && !enabled) || (this.props.grayUnchecked && !visibility) @@ -262,8 +261,7 @@ class LayerTree extends React.Component { ); }; renderLayer = (layer, sublayer, path, enabled = true, inMutuallyExclusiveGroup = false, skipExpanderPlaceholder = false) => { - const onlyGroups = ConfigUtils.getConfigProp("showOnlyLayerGroups", this.props.theme) || this.props.onlyGroups; - if (onlyGroups) { + if (this.props.onlyGroups) { return null; } if (this.state.filtervisiblelayers && !sublayer.visibility) {