Skip to content

Commit

Permalink
Fix splitFeatures
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 14, 2017
1 parent cb29b2e commit fca603c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/qgsvectorlayereditutils.cpp
Expand Up @@ -277,7 +277,6 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitFeatures( const QList
if ( !mLayer->isSpatial() )
return QgsGeometry::InvalidBaseGeometry;

QgsFeatureList newFeatures; //store all the newly created features
double xMin, yMin, xMax, yMax;
QgsRectangle bBox; //bounding box of the split line
QgsGeometry::OperationResult returnCode = QgsGeometry::Success;
Expand All @@ -293,7 +292,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitFeatures( const QList
}
else //else consider all the feature that intersect the bounding box of the split line
{
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) == 0 )
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) )
{
bBox.setXMinimum( xMin );
bBox.setYMinimum( yMin );
Expand Down Expand Up @@ -402,7 +401,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitParts( const QList<Qg
}
else //else consider all the feature that intersect the bounding box of the split line
{
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) == 0 )
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) )
{
bBox.setXMinimum( xMin );
bBox.setYMinimum( yMin );
Expand Down

0 comments on commit fca603c

Please sign in to comment.