Skip to content

Commit

Permalink
Update cloning method for styles
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed May 18, 2017
1 parent 70b2581 commit 8aa2e9b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/qgsmaplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down

0 comments on commit 8aa2e9b

Please sign in to comment.