Skip to content
Permalink
Browse files

copy property back on synchronize back

  • Loading branch information
signedav committed Jan 9, 2019
1 parent 419b65d commit 72bc1395f17cac84e800e4b43ae39317abe172d5
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/qgsofflineediting.cpp
@@ -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 );

0 comments on commit 72bc139

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