Skip to content

Commit fca603c

Browse files
committedAug 14, 2017
Fix splitFeatures
1 parent cb29b2e commit fca603c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎src/core/qgsvectorlayereditutils.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitFeatures( const QList
277277
if ( !mLayer->isSpatial() )
278278
return QgsGeometry::InvalidBaseGeometry;
279279

280-
QgsFeatureList newFeatures; //store all the newly created features
281280
double xMin, yMin, xMax, yMax;
282281
QgsRectangle bBox; //bounding box of the split line
283282
QgsGeometry::OperationResult returnCode = QgsGeometry::Success;
@@ -293,7 +292,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitFeatures( const QList
293292
}
294293
else //else consider all the feature that intersect the bounding box of the split line
295294
{
296-
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) == 0 )
295+
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) )
297296
{
298297
bBox.setXMinimum( xMin );
299298
bBox.setYMinimum( yMin );
@@ -402,7 +401,7 @@ QgsGeometry::OperationResult QgsVectorLayerEditUtils::splitParts( const QList<Qg
402401
}
403402
else //else consider all the feature that intersect the bounding box of the split line
404403
{
405-
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) == 0 )
404+
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) )
406405
{
407406
bBox.setXMinimum( xMin );
408407
bBox.setYMinimum( yMin );

0 commit comments

Comments
 (0)
Please sign in to comment.