[QGIS Commit] r11144 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Jul 22 07:52:19 EDT 2009
Author: wonder
Date: 2009-07-22 07:52:18 -0400 (Wed, 22 Jul 2009)
New Revision: 11144
Modified:
trunk/qgis/src/app/qgsmaptoolsimplify.cpp
Log:
Fixed for simplify tool, show a message if the feature can't be simplified.
By Richard Kostecky.
Modified: trunk/qgis/src/app/qgsmaptoolsimplify.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolsimplify.cpp 2009-07-22 11:40:13 UTC (rev 11143)
+++ trunk/qgis/src/app/qgsmaptoolsimplify.cpp 2009-07-22 11:52:18 UTC (rev 11144)
@@ -153,7 +153,7 @@
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 @@
// 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." ) );
+ }
}
}
More information about the QGIS-commit
mailing list