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

Added move to bottom in layertreeview context menu #35531

Merged
merged 4 commits into from Apr 4, 2020

Conversation

uclaros
Copy link
Contributor

@uclaros uclaros commented Apr 2, 2020

Description

Moving around layers on big projects was made easier with Move to top but still one had to move manually his basemaps to the bottom of the layer list, a cumbersome task in big layer trees. This PR adds a Move to bottom option on the layer tree context menu that works in the same way as Move to top.

Also fixes #35530

@github-actions github-actions bot added this to the 3.14.0 milestone Apr 2, 2020
Copy link
Member

@m-kuhn m-kuhn left a comment

Choose a reason for hiding this comment

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

Nice one!

src/core/layertree/qgslayertreenode.h Outdated Show resolved Hide resolved
src/gui/layertree/qgslayertreeviewdefaultactions.cpp Outdated Show resolved Hide resolved
@m-kuhn m-kuhn added the Feature label Apr 3, 2020
@uclaros
Copy link
Contributor Author

uclaros commented Apr 3, 2020

I could not find tests for QgsLayerTreeNode. Should I add somewhere a test for the new method QgsLayerTreeNode::depth()?

@m-kuhn
Copy link
Member

m-kuhn commented Apr 3, 2020

I could not find tests for QgsLayerTreeNode. Should I add somewhere a test for the new method QgsLayerTreeNode::depth()?

There is tests/src/core/testqgslayertree.cpp . If it doesn't fit in there add a new one 👍

@uclaros
Copy link
Contributor Author

uclaros commented Apr 3, 2020

While it is the closest match, I don't think it fits, no QgsLayerTreeNode methods are tested there.

@m-kuhn
Copy link
Member

m-kuhn commented Apr 3, 2020

In this case just add a new file (in there as cpp test or if you prefer you can also do it on python side, your call).

@uclaros
Copy link
Contributor Author

uclaros commented Apr 3, 2020

You were right, tests/src/core/testqgslayertree.cpp has indeed test for QgsLayerTreeNode too!


int depth() const;
%Docstring
Returns the depth of this node, i.e. the number of it's ancestors
Copy link
Collaborator

Choose a reason for hiding this comment

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

HMm - sipify test should be rejecting this as out-of-sync...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh I see, I don't think you've pushed your "it's" fix yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I missed that one, should be ok now

@nyalldawson nyalldawson added the Changelog Items that are queued to appear in the visual changelog - remove after harvesting label Apr 4, 2020
@nyalldawson nyalldawson merged commit b48a576 into qgis:master Apr 4, 2020
@pigreco
Copy link
Sponsor Contributor

pigreco commented May 12, 2020

Please add GUI/UX label

@m-kuhn
Copy link
Member

m-kuhn commented May 12, 2020

@pigreco please apply for labelling power here: https://github.com/orgs/qgis/teams/community/members

@timlinux timlinux removed the Changelog Items that are queued to appear in the visual changelog - remove after harvesting label May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when Moving to top both a layer and it's parent group
5 participants