Skip to content
Permalink
Browse files

Ignore geometry-less features when calculating layer extent (Fix #8805)

  • Loading branch information
m-kuhn committed Oct 11, 2013
1 parent ee31dfe commit 5ef7f1049f84e68701797a8b877929a344104029
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core/qgsvectorlayer.cpp
@@ -1145,8 +1145,11 @@ QgsRectangle QgsVectorLayer::extent()

for ( QgsFeatureMap::iterator it = mEditBuffer->mAddedFeatures.begin(); it != mEditBuffer->mAddedFeatures.end(); it++ )
{
QgsRectangle r = it->geometry()->boundingBox();
rect.combineExtentWith( &r );
if ( it->geometry() )
{
QgsRectangle r = it->geometry()->boundingBox();
rect.combineExtentWith( &r );
}
}
}
else

0 comments on commit 5ef7f10

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