Skip to content
Permalink
Browse files

Fixed for simplify tool, show a message if the feature can't be simpl…

…ified.

By Richard Kostecky.


git-svn-id: http://svn.osgeo.org/qgis/trunk@11144 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Jul 22, 2009
1 parent 0054b7a commit 7ecd98b12e20802602a366da3103b45969f4206d
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/app/qgsmaptoolsimplify.cpp
@@ -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;
}
@@ -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." ) );
}
}
}

0 comments on commit 7ecd98b

Please sign in to comment.
You can’t perform that action at this time.