[QGIS Commit] r9851 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 18 13:56:15 EST 2008


Author: wonder
Date: 2008-12-18 13:56:15 -0500 (Thu, 18 Dec 2008)
New Revision: 9851

Modified:
   trunk/qgis/src/core/qgsvectorlayer.cpp
Log:
fix for a regression - QgsVectorLayer::featureAtId returns empty attribute map if not in editing mode


Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2008-12-18 18:12:33 UTC (rev 9850)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2008-12-18 18:56:15 UTC (rev 9851)
@@ -1154,6 +1154,10 @@
 
 void QgsVectorLayer::updateFeatureAttributes( QgsFeature &f )
 {
+  // do not update when we aren't in editing mode
+  if ( ! mEditable )
+    return;
+
   if ( mChangedAttributeValues.contains( f.id() ) )
   {
     const QgsAttributeMap &map = mChangedAttributeValues[f.id()];



More information about the QGIS-commit mailing list