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 11, 2023
1 parent 1a1d4c1 commit 32c67f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/vector/qgsvectorlayereditutils.cpp
Expand Up @@ -570,7 +570,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 32c67f8

Please sign in to comment.