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

LayerTree - keep checkstate of the moved layer #1629

Closed
wants to merge 2 commits into from

Conversation

slarosa
Copy link
Member

@slarosa slarosa commented Oct 16, 2014

refs: http://hub.qgis.org/issues/11382

the current behavior does not keep the state of the moved layer when you call the moveLayer method, the layer will always be visible (checked), I think it make more sense to keep the checkstate of the layer when moved to group.

The below snippet does the layer vl visible altough you call setLayerVisible(vl, False)

vl = iface.activeLayer()
legend = iface.legendInterface()

myGroup = legend.addGroup("myGroup", False)
legend.setLayerVisible(vl, False)
legend.moveLayer(vl, myGroup)

with the patch the vl layer will be unchecked into layer tree.

@strk
Copy link
Contributor

strk commented Oct 16, 2014

May I suggest separating the API/ABI-breaking commit from the one that fixes the behavioural breakage ?

@slarosa
Copy link
Member Author

slarosa commented Oct 20, 2014

Hi @strk,
commits would have to be squashed, the API break was solved with 27e8897 by adding default value.

Maybe for now we can cohabit with the current behavior, keeping open this request waiting for more feedback, the release is very close!

@wonder-sk
Copy link
Member

Fixed the problem in a bit better way with 3546b32 - anyway thanks for the pull request!

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