Skip to content
Permalink
Browse files

also recalculate layer extent after rollback (fixes #3155)

  • Loading branch information
jef-n committed Feb 25, 2016
1 parent a43a287 commit 9b5c6831065cbaa2046a2fb0d27ba7ef2cd2211d
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/core/qgsvectorlayer.cpp
@@ -2310,6 +2310,10 @@ bool QgsVectorLayer::rollBack( bool deleteBuffer )
return false;
}

bool rollbackExtent = !mEditBuffer->mDeletedFeatureIds.isEmpty() ||
!mEditBuffer->mAddedFeatures.isEmpty() ||
!mEditBuffer->mChangedGeometries.isEmpty();

emit beforeRollBack();

mEditBuffer->rollBack();
@@ -2336,6 +2340,9 @@ bool QgsVectorLayer::rollBack( bool deleteBuffer )
mCache->deleteCachedGeometries();
}

if ( rollbackExtent )
updateExtents();

emit repaintRequested();
return true;
}

0 comments on commit 9b5c683

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