Skip to content
Permalink
Browse files
Update cloning method for styles
  • Loading branch information
pblottiere committed May 18, 2017
1 parent 70b2581 commit 8aa2e9bd9fa18af0a140969de7fd46b07a98d4af
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/core/qgsmaplayer.cpp
@@ -98,10 +98,9 @@ void QgsMapLayer::clone( QgsMapLayer *layer, bool deep ) const
{
layer->setBlendMode( blendMode() );

QMap<QString, QgsMapLayerStyle> styles = styleManager()->mapLayerStyles();
for ( QString s : styles.keys() )
Q_FOREACH ( QString s, styleManager()->styles() )
{
layer->styleManager()->addStyle( s, styles.value( s ) );
layer->styleManager()->addStyle( s, styleManager()->style( s ) );
}

layer->setName( name() );

0 comments on commit 8aa2e9b

Please sign in to comment.