Skip to content

Commit

Permalink
also copy vector provider encoding when duplicating layers (fixes #11687
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jef-n committed Jun 4, 2015
1 parent 7f29de8 commit c22ad17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -7268,7 +7268,12 @@ void QgisApp::duplicateLayers( QList<QgsMapLayer *> lyrList )
}
else if ( vlayer )
{
dupLayer = new QgsVectorLayer( vlayer->source(), layerDupName, vlayer->providerType() );
QgsVectorLayer *dupVLayer = new QgsVectorLayer( vlayer->source(), layerDupName, vlayer->providerType() );
if ( vlayer->dataProvider() )
{
dupVLayer->setProviderEncoding( vlayer->dataProvider()->encoding() );
}
dupLayer = dupVLayer;
}
}

Expand Down

0 comments on commit c22ad17

Please sign in to comment.