Skip to content

Commit

Permalink
Fix renderer cloning in vector layer when it's null
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed May 18, 2017
1 parent dde58ad commit 30a8134
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -219,11 +219,15 @@ QgsVectorLayer *QgsVectorLayer::clone() const
layer->selectByIds( selectedFeatureIds() );
layer->setExcludeAttributesWms( excludeAttributesWms() );
layer->setExcludeAttributesWfs( excludeAttributesWfs() );
layer->setRenderer( renderer()->clone() );
layer->setAttributeTableConfig( attributeTableConfig() );
layer->setFeatureBlendMode( featureBlendMode() );
layer->setLayerTransparency( layerTransparency() );

if ( renderer() )
{
layer->setRenderer( renderer()->clone() );
}

if ( labeling() )
{
layer->setLabeling( labeling()->clone() );
Expand Down

0 comments on commit 30a8134

Please sign in to comment.