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
)

(cherry picked from commit c22ad17)
  • Loading branch information
jef-n committed Jun 29, 2015
1 parent b8a3a6f commit 1d2539f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7146,7 +7146,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 1d2539f

Please sign in to comment.