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 list non spatial in custom layer order widget #6113

Merged
merged 2 commits into from
Jan 22, 2018

Conversation

3nids
Copy link
Member

@3nids 3nids commented Jan 19, 2018

fix #17887

@3nids 3nids requested a review from wonder-sk January 19, 2018 19:10
{
QgsLayerTreeLayer *nodeLayer = findLayer( layerId );
if ( nodeLayer )
{
// configuration from 2.x projects might have non spatial layers
QgsMapLayer *layer = nodeLayer->layer();
if ( layer->type() == QgsMapLayer::VectorLayer )
Copy link
Collaborator

Choose a reason for hiding this comment

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

QgsMapLayer has isSpatial (always true for rasters), so you could avoid all the casting to vectors here.

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks for the reminder!
fixed

@3nids 3nids merged commit 123470b into qgis:master Jan 22, 2018
@3nids 3nids deleted the layerorder_nonspatial branch January 22, 2018 14:27
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