Skip to content

Commit

Permalink
also recalculate layer extent after rollback (fixes #3155)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 25, 2016
1 parent a43a287 commit 9b5c683
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -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();
Expand All @@ -2336,6 +2340,9 @@ bool QgsVectorLayer::rollBack( bool deleteBuffer )
mCache->deleteCachedGeometries();
}

if ( rollbackExtent )
updateExtents();

emit repaintRequested();
return true;
}
Expand Down

0 comments on commit 9b5c683

Please sign in to comment.