Skip to content
Permalink
Browse files

While I'm here, unallow to add useless points

  • Loading branch information
lbartoletti authored and nyalldawson committed Jan 28, 2020
1 parent 1b00708 commit d3bb3b666ac852e73a68e51eef7b7cf902fbd93b
@@ -34,7 +34,8 @@ void QgsMapToolCircle2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -34,7 +34,8 @@ void QgsMapToolCircleCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -34,7 +34,8 @@ void QgsMapToolEllipseCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -36,7 +36,8 @@ void QgsMapToolEllipseExtent::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -35,7 +35,8 @@ void QgsMapToolEllipseFoci::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 2 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -38,7 +38,8 @@ void QgsMapToolRectangleCenter::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -36,7 +36,8 @@ void QgsMapToolRectangleExtent::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
@@ -41,7 +41,8 @@ void QgsMapToolRegularPolygon2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() )
{
@@ -39,7 +39,8 @@ void QgsMapToolRegularPolygonCenterCorner::cadCanvasReleaseEvent( QgsMapMouseEve

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() )
{
@@ -38,7 +38,8 @@ void QgsMapToolRegularPolygonCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEven

if ( e->button() == Qt::LeftButton )
{
mPoints.append( point );
if ( mPoints.size() < 1 )
mPoints.append( point );

if ( !mPoints.isEmpty() )
{

0 comments on commit d3bb3b6

Please sign in to comment.
You can’t perform that action at this time.