Skip to content

Commit

Permalink
fix crash when removing attributes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11863 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Oct 28, 2009
1 parent e145380 commit bec93e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -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() );
Expand Down Expand Up @@ -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 );

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit bec93e1

Please sign in to comment.