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
  • Loading branch information
elpaso committed Apr 5, 2018
1 parent 63130d4 commit 958cb3d
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 @@ -1077,11 +1077,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 958cb3d

Please sign in to comment.