Skip to content

Commit

Permalink
Reuse code
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 3, 2020
1 parent 68574d9 commit 2b56773
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -1097,13 +1097,7 @@ void QgsOfflineEditing::updateFidLookup( QgsVectorLayer *remoteLayer, sqlite3 *d

void QgsOfflineEditing::copySymbology( QgsVectorLayer *sourceLayer, QgsVectorLayer *targetLayer )
{
const QMap<QString, QgsMapLayerStyle> styles = sourceLayer->styleManager()->mapLayerStyles();
const QStringList styleNames = styles.keys();

for ( const QString &styleName : styleNames )
{
targetLayer->styleManager()->addStyle( styleName, styles.value( styleName ) );
}
targetLayer->styleManager()->copyStylesFrom( sourceLayer->styleManager() );

QString error;
QDomDocument doc;
Expand Down

0 comments on commit 2b56773

Please sign in to comment.