mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Update cloning method for styles
This commit is contained in:
parent
70b2581157
commit
8aa2e9bd9f
@ -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() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user