Offline editing: preserve scale based visibility

This commit is contained in:
Matthias Kuhn 2015-01-21 12:05:03 +01:00
parent 34dc427ada
commit 3dbf70ffe5
2 changed files with 4 additions and 6 deletions

View File

@ -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() )
{

View File

@ -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 );