Skip to content
Permalink
Browse files
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
  • Loading branch information
mhugent committed Jul 21, 2007
1 parent d45a6c8 commit 35591523d235753ea5720a60681097daf877df7a
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/app/qgsmaptooladdfeature.cpp
@@ -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;

0 comments on commit 3559152

Please sign in to comment.