mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Offline editing: preserve scale based visibility
This commit is contained in:
parent
34dc427ada
commit
3dbf70ffe5
@ -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() )
|
||||
{
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user