Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix renderer cloning in vector layer when it's null
- Loading branch information
Showing
with
5 additions
and
1 deletion.
-
+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() ); |
|
|