[offline editing] Support for layers with identical names

This commit is contained in:
Matthias Kuhn 2019-03-14 20:34:09 +01:00
parent 95930ed68c
commit 525f0f01a2
No known key found for this signature in database
GPG Key ID: 7A7F1A1C90C3E6A7

View File

@ -642,7 +642,7 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
char **options = nullptr;
options = CSLSetNameValue( options, "OVERWRITE", "YES" );
options = CSLSetNameValue( options, "IDENTIFIER", tr( "%1 (offline)" ).arg( layer->name() ).toUtf8().constData() );
options = CSLSetNameValue( options, "IDENTIFIER", tr( "%1 (offline)" ).arg( layer->id() ).toUtf8().constData() );
options = CSLSetNameValue( options, "DESCRIPTION", layer->dataComment().toUtf8().constData() );
//the FID-name should not exist in the original data