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/qgis@11144 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Jul 22, 2009
1 parent 95be709 commit 072940515544af7ce7cf96d95224979129b0aa42
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 0729405

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