Skip to content
Permalink
Browse files

Clear cached geometries after commit / rollback. Fixes ticket #7950

  • Loading branch information
mhugent committed Jun 5, 2013
1 parent 1c31a6e commit 6bbc149dfed85c22539a756667e15d9256cafba4
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/core/qgsvectorlayer.cpp
@@ -2592,6 +2592,11 @@ bool QgsVectorLayer::commitChanges()
QgsMessageLog::logMessage( tr( "Commit errors:\n %1" ).arg( mCommitErrors.join( "\n " ) ) );
}

if ( mCache )
{
mCache->deleteCachedGeometries();
}

updateFields();
mDataProvider->updateExtents();

@@ -2634,6 +2639,11 @@ bool QgsVectorLayer::rollBack( bool deleteBuffer )
}
emit editingStopped();

if ( mCache )
{
mCache->deleteCachedGeometries();
}

// invalidate the cache so the layer updates properly to show its original
// after the rollback
setCacheImage( 0 );

0 comments on commit 6bbc149

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