Created
March 30, 2013 18:08
-
-
Save jef-n/5277716 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/providers/memory/qgsmemoryfeatureiterator.cpp b/src/providers/memory/qgsmemoryfeatureiterator.cpp | |
index 0e23f97..24fba43 100644 | |
--- a/src/providers/memory/qgsmemoryfeatureiterator.cpp | |
+++ b/src/providers/memory/qgsmemoryfeatureiterator.cpp | |
@@ -106,6 +106,8 @@ bool QgsMemoryFeatureIterator::nextFeatureUsingList( QgsFeature& feature ) | |
if ( hasFeature ) | |
{ | |
feature = P->mFeatures[*mFeatureIdListIterator]; | |
+ if( !feature.fields() ) | |
+ feature.setFields( &P->mFields ); // allow name-based attribute lookups | |
mFeatureIdListIterator++; | |
} | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment