patch_for_bug_938.txt

Steven Mizuno, 2008-02-18 05:38 PM

Download (753 Bytes)

 
1
Index: src/app/qgsattributetabledisplay.cpp
2
===================================================================
3
--- src/app/qgsattributetabledisplay.cpp	(revision 8155)
4
+++ src/app/qgsattributetabledisplay.cpp	(working copy)
5
@@ -82,11 +82,11 @@
6
   QgsVectorDataProvider* provider = mLayer->getDataProvider();
7
   if (provider)
8
   {
9
-    const QgsFieldMap& fields = provider->fields();
10
-    int fieldcount = provider->fieldCount();
11
-    for (int h = 0; h < fieldcount; h++)
12
+    QgsFieldMap xfields = provider->fields();
13
+    QgsFieldMap::const_iterator fldIt;
14
+    for (fldIt = xfields.begin(); fldIt != xfields.end(); ++fldIt)
15
     {
16
-      mSearchColumns->insertItem(fields[h].name());
17
+      mSearchColumns->insertItem(fldIt->name());
18
     }
19
   }
20