Skip to content
Permalink
Browse files
Improve error message on collapse due to intersection avoidance
  • Loading branch information
Sandro Santilli committed Mar 20, 2013
1 parent 9e40bb4 commit a9674545e3c1b4b4b3c50c5c6ff889b108e34e28
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/app/qgsmaptooladdfeature.cpp
@@ -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;

0 comments on commit a967454

Please sign in to comment.