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@7453 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 18, 2007
1 parent 834c38b commit 415646afa9a9e6bcdec924adc812f98fda1d86c8
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 415646a

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