Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix show layer inside the layer subgroup #400

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Mar 4, 2020

Reproduce:

  1. Add first layer group
  2. Add second layer group
  3. Move second layer group inside first layer group
  4. Add vector map layer inside second layer group
  5. Check checkbox on the first layer group

This error message appear on the Console tab:

  File "/usr/local/grass79/gui/wxpython/lmgr/layertree.py",
line 1660, in OnLayerChecked

self.Map.ChangeLayerActive(mapLayer, checked)
  File "/usr/local/grass79/gui/wxpython/core/render.py",
line 1426, in ChangeLayerActive

layer.active = active
AttributeError
:
'NoneType' object has no attribute 'active'

@petrasovaa petrasovaa self-requested a review March 5, 2020 03:28
Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you, I would like just some small modifications. I would move the if mapLayer: just before self.Map.ChangeLayerActive(mapLayer, checked) since we still probably want to run self.lmgr.WorkspaceChanged(). Also please just add a comment that the condition is for cases when the layer is not map layer but group, it's not obvious.

@tmszi tmszi force-pushed the fix_show_layer_inside_subgroup branch from 395311c to c55de72 Compare March 6, 2020 05:16
@tmszi tmszi force-pushed the fix_show_layer_inside_subgroup branch from c55de72 to e8fba68 Compare March 6, 2020 05:32
@tmszi
Copy link
Member Author

tmszi commented Mar 6, 2020

All right, I fixed it.

@petrasovaa petrasovaa merged commit f195264 into OSGeo:master Mar 6, 2020
@petrasovaa
Copy link
Contributor

Thank you, merged to 78 as well.

HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Mar 20, 2020
@tmszi tmszi deleted the fix_show_layer_inside_subgroup branch July 28, 2020 07:15
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants