Skip to content
Permalink
Browse files

only store name of layerfield if it's actually set, fixes #814

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7453 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 18, 2007
1 parent f0f3f20 commit f0f9bd1271509324a056e08a2f19378176535a44
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/core/qgsvectorlayer.cpp
@@ -1912,10 +1912,13 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )

if ( myLabel )
{
dField = document.createElement( "labelfield" );
dFieldText = document.createTextNode( myLabel->labelField(QgsLabel::Text ) );
dField.appendChild( dFieldText );
layer_node.appendChild( dField );
QString fieldname = myLabel->labelField(QgsLabel::Text);
if(fieldname!="") {
dField = document.createElement( "labelfield" );
dFieldText = document.createTextNode( fieldname );
dField.appendChild( dFieldText );
layer_node.appendChild( dField );
}

std::stringstream labelXML;

0 comments on commit f0f9bd1

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