mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
test geometry validity before applying offset
This commit is contained in:
parent
b0bc2b20c7
commit
cad45c0b80
@ -300,7 +300,13 @@ void QgsMapToolOffsetCurve::applyOffset( const double &offset, const Qt::Keyboar
|
||||
}
|
||||
mModifiedGeometry = QgsGeometry::fromPolygonXY( newPoly );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !mModifiedGeometry.isGeosValid() )
|
||||
{
|
||||
emit messageEmitted( tr( "Generated geometry is not valid." ), Qgis::Critical );
|
||||
// no cancel, allow to continue editing.
|
||||
return;
|
||||
}
|
||||
|
||||
mLayer->beginEditCommand( tr( "Offset curve" ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user