Skip to content

Commit

Permalink
fix #1162
Browse files Browse the repository at this point in the history
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 56b5ba7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/symbology/qgssymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 56b5ba7

Please sign in to comment.