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

Use a filter proxy model for the dependencies layer tree #37000

Merged
merged 7 commits into from
Jun 6, 2020

Conversation

3nids
Copy link
Member

@3nids 3nids commented Jun 5, 2020

The layer tree for dependencies (in vector layer properties) was showing symbols and also the main layer.
This fixes this by using a layer tree filter proxy model (similarly to the snapping and data sources).

I have create a re-usable base class QgsLayerTreeFilterProxyModel which makes this easy.
Next step (after release I guess), would be to use the same base class in other places (snapping, data sources, DXF export, …)

@github-actions github-actions bot added this to the 3.14.0 milestone Jun 5, 2020
This will refresh the model
%End

void setMapLayerTypeFilter( const QList<QgsMapLayerType> &types = QList<QgsMapLayerType>() );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be better to reuse the filters from the map layer model proxy instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, and done :)

@3nids 3nids merged commit ce17f7f into qgis:master Jun 6, 2020
@3nids 3nids deleted the layer-tree-filter-proxy branch June 6, 2020 11:05
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

2 participants