Skip to content

Commit

Permalink
[bugfix] Layer rendering order broken in QGIS 3x
Browse files Browse the repository at this point in the history
Fixes #18620

Cherry-picked from master 958cb3d
  • Loading branch information
elpaso committed Apr 5, 2018
1 parent 2cae2f4 commit ca73205
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/qgsproject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,11 +1016,12 @@ bool QgsProject::readProjectFile( const QString &filename )
{
mRootGroup->readLayerOrderFromXml( layerTreeElem );
}
else

// Load pre 3.0 configuration
QDomElement layerTreeCanvasElem = doc->documentElement().firstChildElement( QStringLiteral( "layer-tree-canvas" ) );
if ( !layerTreeCanvasElem.isNull( ) )
{
// Load pre 3.0 configuration
QDomElement elem = doc->documentElement().firstChildElement( QStringLiteral( "layer-tree-canvas" ) );
mRootGroup->readLayerOrderFromXml( elem );
mRootGroup->readLayerOrderFromXml( layerTreeCanvasElem );
}

// make sure the are just valid layers
Expand Down

0 comments on commit ca73205

Please sign in to comment.