Skip to content

Commit

Permalink
Offline editing: preserve scale based visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 22, 2015
1 parent 34dc427 commit 3dbf70f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -838,17 +838,15 @@ void QgsOfflineEditing::updateFidLookup( QgsVectorLayer* remoteLayer, sqlite3* d
}
}

void QgsOfflineEditing::copySymbology( const QgsVectorLayer* sourceLayer, QgsVectorLayer* targetLayer )
void QgsOfflineEditing::copySymbology( QgsVectorLayer* sourceLayer, QgsVectorLayer* targetLayer )
{
QString error;
QDomDocument doc;
QDomElement node = doc.createElement( "symbology" );
doc.appendChild( node );
sourceLayer->writeSymbology( node, doc, error );
sourceLayer->exportNamedStyle( doc, error );

if ( error.isEmpty() )
{
targetLayer->readSymbology( node, error );
targetLayer->importNamedStyle( doc, error );
}
if ( !error.isEmpty() )
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsofflineediting.h
Expand Up @@ -104,7 +104,7 @@ class CORE_EXPORT QgsOfflineEditing : public QObject
void applyAttributeValueChanges( QgsVectorLayer* offlineLayer, QgsVectorLayer* remoteLayer, sqlite3* db, int layerId, int commitNo );
void applyGeometryChanges( QgsVectorLayer* remoteLayer, sqlite3* db, int layerId, int commitNo );
void updateFidLookup( QgsVectorLayer* remoteLayer, sqlite3* db, int layerId );
void copySymbology( const QgsVectorLayer* sourceLayer, QgsVectorLayer* targetLayer );
void copySymbology( QgsVectorLayer* sourceLayer, QgsVectorLayer* targetLayer );
QMap<int, int> attributeLookup( QgsVectorLayer* offlineLayer, QgsVectorLayer* remoteLayer );

void showWarning( const QString& message );
Expand Down

0 comments on commit 3dbf70f

Please sign in to comment.