Skip to content

Commit a967454

Browse files
author
Sandro Santilli
committed
Improve error message on collapse due to intersection avoidance
1 parent 9e40bb4 commit a967454

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/qgsmaptooladdfeature.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,11 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )
268268

269269
if ( !f->geometry()->asWkb() ) //avoid intersection might have removed the whole geometry
270270
{
271-
QMessageBox::critical( 0, tr( "Error" ), tr( "The feature cannot be added because it contains an emtpy geometry" ) );
271+
QString reason = tr( "The feature cannot be added because it contains an empty geometry" );
272+
if ( avoidIntersectionsReturn == 2 ) {
273+
reason += QString( " (" + tr("collapsed due to intersection avoidance") + ")" );
274+
}
275+
QMessageBox::critical( 0, tr( "Error" ), reason );
272276
delete f;
273277
stopCapturing();
274278
return;

0 commit comments

Comments
 (0)