lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

[Bug]: "Toggle" setting in Layers tab on Lizmap QGIS plugin not working on groups

Open mind84 opened this issue 2 years ago • 4 comments

What is the bug?

Hi, the follow configuration on Lizmap plugin:

group1

  • group1 -> Toggle unchecked
  • all children of group1 -> Toggle checked

seems not to be interpreted correctly by LWC

group1_LWC

The tree should be initialized like this (?)

group1_desired

Thanks

Steps to reproduce the issue

See attached project to reproduce the issue:

groups.zip

Versions

Versions :

  • Lizmap Web Client : 3.7.0-beta.1
  • Lizmap plugin : 3.17.0
  • QGIS Desktop : 3.28.7
  • QGIS Server : 3.28.5
  • Py-QGIS-Server :
  • QGIS Server plugin atlasprint : not found
  • QGIS Server plugin lizmap_server : 2.8.1
  • QGIS Server plugin wfsOutputExtension : 1.7.0

Check Lizmap plugin

  • [X] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

QGIS server version, only if the section above doesn't mention the QGIS Server version

No response

Operating system

Debian

Browsers

Firefox, Chrome

Browsers version

last

Relevant log output

No response

mind84 avatar Nov 16 '23 13:11 mind84

The toggled option for groups was never taken into account. It was always the layers toggled state that fixed the group toggled state.

rldhont avatar Nov 24 '23 16:11 rldhont

@rldhont,

As far as we can see, in 3.7 this functionality is changed and emulates the QGIS functionality. In previous versions the checkbox on groups is basically a shortcut to check or uncheck all of the group's children, and it's ok to not take into account the group configuration. In 3.7, instead, the group checkbox is used to enable/disable the group, exactly how it works within QGIS: when you uncheck the group, if some children are checked they remain checked but not displayed, so when you reactivate the group you don't have to uncheck the layers you don't want to display.

If this is the intended behaviour, the group configuration (enabled/disabled) at the Lizmap QGIS plugin becomes relevant.

mind84 avatar Nov 27 '23 09:11 mind84

I didn't follow the latest status here, but if there is a special behavior to do in the plugin when LWC 3.7 is used (and not previous versions of LWC), this can be added on the plugin side.

Gustry avatar Nov 27 '23 09:11 Gustry

well, I do not get it either - in 3.6.X the behaviour was ok - When the group was toggeld (as user in LWC) all layers of this group get toggled as well. But now in 3.7 i have to activate each and every layer of my group, to get the whole bunch of layers shown on the map. Preferably the behaviour like in QGIS should be followed by LWC - layers of a group can be toggled, but as long as the group itself is not toggeld, the layers do not appear on the map.

meyerlor avatar Dec 04 '23 09:12 meyerlor