Skip to content

Commit

Permalink
Fix loading of labeling from 2.x projects
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 16, 2017
1 parent 53f8e7f commit 56309ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/qgsmaplayer.cpp
Expand Up @@ -377,6 +377,10 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, const QgsReadWr
savedValidation = QgsCoordinateReferenceSystem::customCrsValidation();
QgsCoordinateReferenceSystem::setCustomCrsValidation( nullptr );

// read custom properties before passing reading further to a subclass, so that
// the subclass can also read custom properties
readCustomProperties( layerElement );

// now let the children grab what they need from the Dom node.
layerError = !readXml( layerElement, context );

Expand Down Expand Up @@ -504,8 +508,6 @@ bool QgsMapLayer::readLayerXml( const QDomElement &layerElement, const QgsReadWr
}
#endif

readCustomProperties( layerElement );

mMetadata.readFromLayer( this );

return true;
Expand Down

0 comments on commit 56309ef

Please sign in to comment.