Skip to content

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/app/qgsattributedialog.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ bool QgsAttributeDialog::queryAttributes(const QgsFieldMap& fields, QgsFeature&
8181
QgsAttributeDialog attdialog(fields, featureAttributes);
8282

8383
if (attdialog.exec() == QDialog::Accepted)
84-
{
85-
for (int i = 0; i < featureAttributes.size(); ++i)
84+
{
85+
int i=0;
86+
for (QgsAttributeMap::const_iterator it = featureAttributes.begin(); it != featureAttributes.end(); ++it)
8687
{
87-
f.changeAttribute(i, QVariant(attdialog.value(i)) );
88+
f.changeAttribute(it.key(), QVariant(attdialog.value(i++)) );
8889
}
8990
return true;
9091
}

0 commit comments

Comments
 (0)
Please sign in to comment.