Skip to content
Browse files

Handle rest of enum cases instead of using default

  • Loading branch information
uclaros authored and nyalldawson committed Mar 31, 2021
1 parent 6f2d665 commit 2acd8329b4b50db701a6a6349d1fea2c9d0768d0
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/app/qgsmaptooladdpart.cpp
@@ -255,7 +255,14 @@ void QgsMapToolAddPart::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
errorMessage = tr( "Base geometry is not valid." );

case QgsGeometry::OperationResult::AddRingCrossesExistingRings:
case QgsGeometry::OperationResult::AddRingNotClosed:
case QgsGeometry::OperationResult::AddRingNotInExistingFeature:
case QgsGeometry::OperationResult::AddRingNotValid:
case QgsGeometry::OperationResult::GeometryEngineError:
case QgsGeometry::OperationResult::LayerNotEditable:
case QgsGeometry::OperationResult::NothingHappened:
case QgsGeometry::OperationResult::SplitCannotSplitPoint:
// Should not reach here
// Other OperationResults should not be returned by addPart
errorMessage = tr( "Unexpected OperationResult: %1" ).arg( errorCode );

0 comments on commit 2acd832

Please sign in to comment.