Skip to content

Commit 6bbc149

Browse files
committed
Clear cached geometries after commit / rollback. Fixes ticket #7950
1 parent 1c31a6e commit 6bbc149

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/core/qgsvectorlayer.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,6 +2592,11 @@ bool QgsVectorLayer::commitChanges()
25922592
QgsMessageLog::logMessage( tr( "Commit errors:\n %1" ).arg( mCommitErrors.join( "\n " ) ) );
25932593
}
25942594

2595+
if ( mCache )
2596+
{
2597+
mCache->deleteCachedGeometries();
2598+
}
2599+
25952600
updateFields();
25962601
mDataProvider->updateExtents();
25972602

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

2642+
if ( mCache )
2643+
{
2644+
mCache->deleteCachedGeometries();
2645+
}
2646+
26372647
// invalidate the cache so the layer updates properly to show its original
26382648
// after the rollback
26392649
setCacheImage( 0 );

0 commit comments

Comments
 (0)