Bug report #17927

Group Layers not activating when Theme is selected.

Added by Nathan Saylor almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:GUI
Affected QGIS version:master Regression?:Yes
Operating System:Win7 Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25823

Description

Even when the group layer is turned on when saving a theme, it does not come on when the theme is activated, thus keeping desired layers hidden.

Associated revisions

Revision b6444472
Added by Alessandro Pasotti almost 7 years ago

[bugfix] Ensure parent group visibility when apply theme

Fixes #17927 Group Layers not activating when Theme is selected.

History

#1 Updated by Nathan Saylor almost 7 years ago

Playing around a little more with it,starting with a new project...
1. Add two layers
2. Add group layer
3. Move the two layers to the group layer.
4. With all three activated, add Theme.
5. Add another layer; move it out of the group if necessary.
6. Turn off group layer.
7. Click on Theme to activate.
7r. Group layer does not activate. Theme shows active.
8. Turn on group layer to reveal layers.
8r. Theme shows inactive.
9. Turn off layers inside group.
9r. THEME SHOWS ACTIVE?!
10. With the sublayers already off, turn off group layer.
10r. Theme still shows active!

#2 Updated by Alessandro Pasotti almost 7 years ago

  • Assignee set to Alessandro Pasotti

#3 Updated by Alessandro Pasotti almost 7 years ago

Do I understand that correctly that the issue is that if the layers in a theme are within a group the group must be switched on if at least one of the layers is visible?

Let's make an example V=visible v=visible-grey:

[V] Group 1
    [V] Layer 1
    [V] Layer 2
-> save theme
-> make some changes in the tree
[ ] Group 1
    [v] Layer 1
    [ ] Layer 2
-> activate theme
[V] Group 1
    [V] Layer 1
    [V] Layer 2
-> make some changes in the tree
[V] Group 1
    [V] Layer 1
    [ ] Layer 2
-> activate theme
[V] Group 1
    [V] Layer 1
    [V] Layer 2

If this is the issue, a patch is coming ...

Note that group status is not saved in the themes.

#4 Updated by Alessandro Pasotti almost 7 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Status changed from Open to In Progress

#5 Updated by Nathan Saylor almost 7 years ago

The group layers have always responded to the the toggling of any of its sublayers. THAT may actually be the bigger issue here. So yeah, I think you got it then. I didn't realize that the problem isn't with the Themes, but with how the groups and sublayers are responding to each other. Thanks!

#6 Updated by Anonymous almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

#7 Updated by Alessandro Pasotti almost 7 years ago

  • Resolution set to fixed/implemented

Please give it a try.

Also available in: Atom PDF