mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
add line or polygon features only if vertex count is >= 2
git-svn-id: http://svn.osgeo.org/qgis/trunk@7083 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
d45a6c840c
commit
35591523d2
@ -223,6 +223,13 @@ void QgsMapToolAddFeature::canvasReleaseEvent(QMouseEvent * e)
|
||||
delete mRubberBand;
|
||||
mRubberBand = NULL;
|
||||
|
||||
//bail out if there are not at least two vertices
|
||||
if(mCaptureList.size() < 2)
|
||||
{
|
||||
mCaptureList.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
//create QgsFeature with wkb representation
|
||||
QgsFeature* f = new QgsFeature(0,"WKBLineString");
|
||||
unsigned char* wkb;
|
||||
|
Loading…
x
Reference in New Issue
Block a user