Skip to content

Commit

Permalink
Fixed for simplify tool, show a message if the feature can't be simpl…
Browse files Browse the repository at this point in the history
…ified.

By Richard Kostecky.


git-svn-id: http://svn.osgeo.org/qgis/trunk@11144 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jul 22, 2009
1 parent 0054b7a commit 7ecd98b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/qgsmaptoolsimplify.cpp
Expand Up @@ -153,7 +153,7 @@ bool QgsMapToolSimplify::calculateSliderBoudaries()
bool isLine = mSelectedFeature.geometry()->type() == QGis::Line;
QVector<QgsPoint> pts = getPointList( mSelectedFeature );
int size = pts.size();
if ( size == 0 || ( isLine && size < 2 ) || ( !isLine && size < 4 ) )
if ( size == 0 || ( isLine && size <= 2 ) || ( !isLine && size <= 4 ) )
{
return false;
}
Expand Down Expand Up @@ -294,6 +294,10 @@ void QgsMapToolSimplify::canvasPressEvent( QMouseEvent * e )
// show dialog as a non-modal window
mSimplifyDialog->show();
}
else
{
QMessageBox::warning( 0, tr( "Unsupported operation" ), tr( "This feature cannot be simplified. Check if feature has enough vertices to be simplified." ) );
}
}
}

Expand Down

0 comments on commit 7ecd98b

Please sign in to comment.