Skip to content
Permalink
Browse files

Reuse code

  • Loading branch information
m-kuhn committed Jun 3, 2020
1 parent 68574d9 commit 2b5677333f5469b64a525e9de718a88808979341
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/core/qgsofflineediting.cpp
@@ -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;

0 comments on commit 2b56773

Please sign in to comment.
You can’t perform that action at this time.