Skip to content

Commit

Permalink
Improve error message on collapse due to intersection avoidance
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Santilli committed Mar 20, 2013
1 parent 9e40bb4 commit a967454
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -268,7 +268,11 @@ void QgsMapToolAddFeature::canvasReleaseEvent( QMouseEvent * e )

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

0 comments on commit a967454

Please sign in to comment.