Skip to content
Permalink
Browse files
fix for bug where feature splitting was not possible if bounding box …
…of split line was a line

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8100 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Feb 3, 2008
1 parent 5fcec96 commit bb008af509b6359f80dd8eaa0da04b49fc9bd1e7
Showing with 15 additions and 1 deletion.
  1. +15 −1 src/core/qgsvectorlayer.cpp
@@ -1722,7 +1722,21 @@ int QgsVectorLayer::splitFeatures(const QList<QgsPoint>& splitLine, bool topolog

if(bBox.isEmpty())
{
return 2;
//if the bbox is a line, try to make a square out of it
if(!bBox.width() > 0.0 && bBox.height() > 0)
{
bBox.setXmin(bBox.xMin() - bBox.height()/2);
bBox.setXmax(bBox.xMax() + bBox.height()/2);
}
else if(!bBox.height() > 0.0 && bBox.width() > 0)
{
bBox.setYmin(bBox.yMin() - bBox.width()/2);
bBox.setYmax(bBox.yMax() + bBox.width()/2);
}
else
{
return 2;
}
}
featuresInRectangle(bBox, featureList);
}

0 comments on commit bb008af

Please sign in to comment.