Skip to content
Permalink
Browse files

fix crash when removing attributes

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11863 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Oct 28, 2009
1 parent e145380 commit bec93e1e9cf214a577e28f676ce4637d3b764c25
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsvectorlayer.cpp
@@ -1139,7 +1139,7 @@ void QgsVectorLayer::updateFeatureAttributes( QgsFeature &f )
}

// 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 @@ int QgsVectorLayer::pendingFeatureCount()
bool QgsVectorLayer::commitChanges()
{
bool success = true;

//clear the cache image so markers dont appear anymore on next draw
setCacheImage( 0 );

@@ -3094,7 +3094,7 @@ bool QgsVectorLayer::rollBack()
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();

0 comments on commit bec93e1

Please sign in to comment.
You can’t perform that action at this time.