Skip to content
Permalink
Browse files
fix #1162
git-svn-id: http://svn.osgeo.org/qgis/trunk@9771 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 11, 2008
1 parent 64a24a9 commit 56b5ba7e5582b2f4318ef609cc9e0cc3c0985a34
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/symbology/qgssymbol.cpp
@@ -484,11 +484,11 @@ int QgsSymbol::readFieldName( QDomNode &synode, QString name, const QgsVectorLay
const QgsFieldMap &fields = vl.pendingFields();
QString name = node.toElement().text();

int i;
for ( i = 0; i < fields.size() && fields[i].name() != name; i++ )
;
for ( QgsFieldMap::const_iterator it = fields.begin(); it != fields.end(); it++ )
if( it->name() == name )
return it.key();

return i < fields.size() ? i : -1;
return -1;
}

node = synode.namedItem( name );

0 comments on commit 56b5ba7

Please sign in to comment.