[QGIS Commit] r9852 - branches/Version-1_0/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 18 13:59:27 EST 2008


Author: wonder
Date: 2008-12-18 13:59:27 -0500 (Thu, 18 Dec 2008)
New Revision: 9852

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


Modified: branches/Version-1_0/src/core/qgsvectorlayer.cpp
===================================================================
--- branches/Version-1_0/src/core/qgsvectorlayer.cpp	2008-12-18 18:56:15 UTC (rev 9851)
+++ branches/Version-1_0/src/core/qgsvectorlayer.cpp	2008-12-18 18:59:27 UTC (rev 9852)
@@ -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