Skip to content

Commit

Permalink
Update layer transform context when adding them to a project
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Apr 17, 2019
1 parent 87998f7 commit 27696e8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/core/qgsproject.cpp
Expand Up @@ -2786,11 +2786,18 @@ QList<QgsMapLayer *> QgsProject::addMapLayers(
bool addToLegend,
bool takeOwnership )
{
const QList<QgsMapLayer *> myResultList = mLayerStore->addMapLayers( layers, takeOwnership );
const QList<QgsMapLayer *> myResultList { mLayerStore->addMapLayers( layers, takeOwnership ) };
if ( !myResultList.isEmpty() )
{
// Update transform context
for ( auto &l : myResultList )
{
l->setTransformContext( transformContext() );
}
if ( addToLegend )
{
emit legendLayersAdded( myResultList );
}
}

if ( mAuxiliaryStorage )
Expand Down

0 comments on commit 27696e8

Please sign in to comment.