Skip to content

Commit

Permalink
Fix split parts tool for multilinestring layers
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ committed Jan 13, 2023
1 parent 713fb9c commit e785eb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/vector/qgsvectorlayereditutils.cpp
Expand Up @@ -556,7 +556,10 @@ Qgis::GeometryOperationResult QgsVectorLayerEditUtils::splitParts( const QgsPoin

++numberOfSplitParts;
}
else if ( splitFunctionReturn == Qgis::GeometryOperationResult::NothingHappened )
// Note: For multilinestring layers, when the split line does not intersect the feature part,
// QgsGeometry::splitGeometry returns InvalidBaseGeometry instead of NothingHappened
else if ( splitFunctionReturn == Qgis::GeometryOperationResult::NothingHappened ||
splitFunctionReturn == Qgis::GeometryOperationResult::InvalidBaseGeometry )
{
// Add part as is
resultCollection.append( part );
Expand Down

0 comments on commit e785eb5

Please sign in to comment.