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

do not insert layers in embedded groups #10004

Merged
merged 2 commits into from May 27, 2019
Merged

do not insert layers in embedded groups #10004

merged 2 commits into from May 27, 2019

Conversation

3nids
Copy link
Member

@3nids 3nids commented May 14, 2019

fixes #21863

not sure if this code (written twice here) would be better suited in QgsLayerTreeRegistryBridge::setLayerInsertionPoint

would be nice if some layer-tree aficionados would be looking into this one ;)

@3nids 3nids requested a review from wonder-sk May 14, 2019 21:01
Copy link
Member

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

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

It looks good to me, but would it be possible to extract the duplicated code for finding first non-embedded parent to a function in QgsLayerTreeUtils to avoid code duplication? It would also make the logic easier to read and possibly to have a unit test for that as well...

@nyalldawson
Copy link
Collaborator

While you're addressing this -- a very similar issue is that sometimes layers get inserted into mutually exclusive groups. The fix would be almost identical to this one...

@3nids
Copy link
Member Author

3nids commented May 17, 2019

Sorry, why would not have layers inserted into mutually exclusive groups?

@nyalldawson
Copy link
Collaborator

This is for the auto-insertion point when a new layer is added to a project, right?

@3nids
Copy link
Member Author

3nids commented May 18, 2019

@nyalldawson yes, and I don't see what makes you think a layer should not end up there.

@nyalldawson nyalldawson added this to the 3.8.0 milestone May 19, 2019
@3nids 3nids force-pushed the fix21863 branch 2 times, most recently from 473defe to 2042ba4 Compare May 23, 2019 04:13
@3nids 3nids merged commit d7fa028 into qgis:master May 27, 2019
@3nids 3nids deleted the fix21863 branch May 27, 2019 04:25
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.

temporary deactivate snapping options while digitizing
3 participants