Skip to content
Permalink
Browse files
Fix renderer cloning in vector layer when it's null
  • Loading branch information
pblottiere committed May 18, 2017
1 parent dde58ad commit 30a813494f2069d19e8b5ea0637b5c512bdbae22
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/qgsvectorlayer.cpp
@@ -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() );

0 comments on commit 30a8134

Please sign in to comment.