Skip to content

Commit

Permalink
copy property back on synchronize back
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Jan 9, 2019
1 parent 419b65d commit 72bc139
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -260,6 +260,11 @@ void QgsOfflineEditing::synchronize()
updateMapThemes( offlineLayer, remoteLayer );
updateLayerOrder( offlineLayer, remoteLayer );

//set QgsLayerTreeNode properties back
QgsLayerTreeLayer *layerTreeLayer = QgsProject::instance()->layerTreeRoot()->findLayer( offlineLayer->id() );
QgsLayerTreeLayer *newLayerTreeLayer = QgsProject::instance()->layerTreeRoot()->findLayer( remoteLayer->id() );
newLayerTreeLayer->setCustomProperty( CUSTOM_SHOW_FEATURE_COUNT, layerTreeLayer->customProperty( CUSTOM_SHOW_FEATURE_COUNT ) );

// apply layer edit log
QString qgisLayerId = layer->id();
QString sql = QStringLiteral( "SELECT \"id\" FROM 'log_layer_ids' WHERE \"qgis_id\" = '%1'" ).arg( qgisLayerId );
Expand Down

0 comments on commit 72bc139

Please sign in to comment.