Skip to content
Permalink
Browse files

Update layer transform context when adding them to a project

  • Loading branch information
elpaso authored and nyalldawson committed Apr 17, 2019
1 parent 87998f7 commit 27696e86291722a701d421e63f633ba6c4ae7572
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/qgsproject.cpp
@@ -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 )

0 comments on commit 27696e8

Please sign in to comment.
You can’t perform that action at this time.