Skip to content


add line or polygon features only if vertex count is >= 2
Browse files Browse the repository at this point in the history
git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 21, 2007
1 parent 782dd87 commit ebae297
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/qgsmaptooladdfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

//create QgsFeature with wkb representation
QgsFeature* f = new QgsFeature(0,"WKBLineString");
unsigned char* wkb;
Expand Down

0 comments on commit ebae297

Please sign in to comment.