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/qgis@7083 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 21, 2007
1 parent 782dd87 commit ebae2973384af4d5b4dfb81d057812f3c6a7b11a
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 ebae297

Please sign in to comment.