mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
store original layer id in the layers customProperties
This commit is contained in:
parent
a66784465a
commit
9ea7f449e4
@ -60,6 +60,7 @@ extern "C"
|
||||
#define CUSTOM_PROPERTY_REMOTE_SOURCE "remoteSource"
|
||||
#define CUSTOM_PROPERTY_REMOTE_PROVIDER "remoteProvider"
|
||||
#define CUSTOM_SHOW_FEATURE_COUNT "showFeatureCount"
|
||||
#define CUSTOM_PROPERTY_ORIGINAL_LAYERID "remoteLayerId"
|
||||
#define PROJECT_ENTRY_SCOPE_OFFLINE "OfflineEditingPlugin"
|
||||
#define PROJECT_ENTRY_KEY_OFFLINE_DB_PATH "/OfflineDbPath"
|
||||
|
||||
@ -858,9 +859,10 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
|
||||
// mark as offline layer
|
||||
newLayer->setCustomProperty( CUSTOM_PROPERTY_IS_OFFLINE_EDITABLE, true );
|
||||
|
||||
// store original layer source
|
||||
// store original layer source and information
|
||||
newLayer->setCustomProperty( CUSTOM_PROPERTY_REMOTE_SOURCE, layer->source() );
|
||||
newLayer->setCustomProperty( CUSTOM_PROPERTY_REMOTE_PROVIDER, layer->providerType() );
|
||||
newLayer->setCustomProperty( CUSTOM_PROPERTY_ORIGINAL_LAYERID, layer->id() );
|
||||
|
||||
// register this layer with the central layers registry
|
||||
QgsProject::instance()->addMapLayers(
|
||||
|
Loading…
x
Reference in New Issue
Block a user