Skip to content

Commit 8aa2e9b

Browse files
committedMay 18, 2017
Update cloning method for styles
1 parent 70b2581 commit 8aa2e9b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/core/qgsmaplayer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,9 @@ void QgsMapLayer::clone( QgsMapLayer *layer, bool deep ) const
9898
{
9999
layer->setBlendMode( blendMode() );
100100

101-
QMap<QString, QgsMapLayerStyle> styles = styleManager()->mapLayerStyles();
102-
for ( QString s : styles.keys() )
101+
Q_FOREACH ( QString s, styleManager()->styles() )
103102
{
104-
layer->styleManager()->addStyle( s, styles.value( s ) );
103+
layer->styleManager()->addStyle( s, styleManager()->style( s ) );
105104
}
106105

107106
layer->setName( name() );

0 commit comments

Comments
 (0)
Please sign in to comment.