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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Oct 28 17:10:43 EDT 2009


Author: jef
Date: 2009-10-28 17:10:42 -0400 (Wed, 28 Oct 2009)
New Revision: 11863

Modified:
   trunk/qgis/src/core/qgsvectorlayer.cpp
Log:
fix crash when removing attributes

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2009-10-28 13:27:15 UTC (rev 11862)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2009-10-28 21:10:42 UTC (rev 11863)
@@ -1139,7 +1139,7 @@
   }
 
   // remove all attributes that will disappear
-  const QgsAttributeMap &map = f.attributeMap();
+  QgsAttributeMap map = f.attributeMap();
   for ( QgsAttributeMap::const_iterator it = map.begin(); it != map.end(); it++ )
     if ( !mUpdatedFields.contains( it.key() ) )
       f.deleteAttribute( it.key() );
@@ -2768,7 +2768,7 @@
 bool QgsVectorLayer::commitChanges()
 {
   bool success = true;
-  
+
   //clear the cache image so markers dont appear anymore on next draw
   setCacheImage( 0 );
 
@@ -3094,7 +3094,7 @@
   emit editingStopped();
 
   setModified( FALSE );
-  // invalidate teh cache so the layer updates properly to show its original 
+  // invalidate the cache so the layer updates properly to show its original
   // after the rollback
   setCacheImage( 0 );
   triggerRepaint();



More information about the QGIS-commit mailing list