Skip to content
Permalink
Browse files

Fix for ticket #445 qgis crash deleting point in postgis table

git-svn-id: http://svn.osgeo.org/qgis/trunk@6269 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Dec 16, 2006
1 parent 8d9e32c commit 1dbf9c8923abc9f7b096e413053340a70473e119
Showing with 12 additions and 3 deletions.
  1. +6 −1 src/core/qgsfeature.cpp
  2. +6 −2 src/gui/qgsvectorlayer.cpp
@@ -1437,7 +1437,12 @@ QgsPoint QgsFeature::closestVertex(const QgsPoint& point) const
//
QgsRect QgsFeature::boundingBox() const
{
return mGeometry->boundingBox();
if(mGeometry)
{
return mGeometry->boundingBox();
}
QgsRect nullRect;
return nullRect;
}
// QgsRect QgsFeature::boundingBox() const
// {
@@ -853,6 +853,7 @@ void QgsVectorLayer::draw(QPainter * p,
{
if (mDeletedFeatureIds.find(fet->featureId()) != mDeletedFeatureIds.end())
{
delete fet;
continue; //dont't draw feature marked as deleted
}
if (mChangedGeometries.find(fet->featureId()) != mChangedGeometries.end())
@@ -1557,8 +1558,11 @@ void QgsVectorLayer::updateExtents()
{
if(mDeletedFeatureIds.find(fet->featureId())==mDeletedFeatureIds.end())
{
bb=fet->boundingBox();
layerExtent.combineExtentWith(&bb);
if(fet->geometry())
{
bb=fet->boundingBox();
layerExtent.combineExtentWith(&bb);
}
}
delete fet;
}

0 comments on commit 1dbf9c8

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