Skip to content
Permalink
Browse files

Add Z support to AddRegularPolygon map tools

  • Loading branch information
pblottiere committed Feb 16, 2018
1 parent 4c6d03c commit 4bfc7b786e7c9db59f7644462a1a5244546bcc64
@@ -36,7 +36,7 @@ QgsMapToolRegularPolygon2Points::~QgsMapToolRegularPolygon2Points()

void QgsMapToolRegularPolygon2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
QgsPoint mapPoint( e->mapPoint() );
QgsPoint mapPoint = fromPointXY( e->mapPoint() );

if ( e->button() == Qt::LeftButton )
{
@@ -65,7 +65,7 @@ void QgsMapToolRegularPolygon2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e

void QgsMapToolRegularPolygon2Points::cadCanvasMoveEvent( QgsMapMouseEvent *e )
{
QgsPoint mapPoint( e->mapPoint() );
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
if ( mTempRubberBand )
{
mRegularPolygon = QgsRegularPolygon( mPoints.at( 0 ), mapPoint, mNumberSidesSpinBox->value() );
@@ -33,7 +33,7 @@ QgsMapToolRegularPolygonCenterCorner::~QgsMapToolRegularPolygonCenterCorner()

void QgsMapToolRegularPolygonCenterCorner::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
QgsPoint mapPoint( e->mapPoint() );
QgsPoint mapPoint = fromPointXY( e->mapPoint() );

if ( e->button() == Qt::LeftButton )
{
@@ -62,7 +62,7 @@ void QgsMapToolRegularPolygonCenterCorner::cadCanvasReleaseEvent( QgsMapMouseEve

void QgsMapToolRegularPolygonCenterCorner::cadCanvasMoveEvent( QgsMapMouseEvent *e )
{
QgsPoint mapPoint( e->mapPoint() );
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
if ( mTempRubberBand )
{
QgsRegularPolygon::ConstructionOption option = QgsRegularPolygon::InscribedCircle;
@@ -33,7 +33,7 @@ QgsMapToolRegularPolygonCenterPoint::~QgsMapToolRegularPolygonCenterPoint()

void QgsMapToolRegularPolygonCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
QgsPoint mapPoint( e->mapPoint() );
QgsPoint mapPoint = fromPointXY( e->mapPoint() );

if ( e->button() == Qt::LeftButton )
{
@@ -62,7 +62,7 @@ void QgsMapToolRegularPolygonCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEven

void QgsMapToolRegularPolygonCenterPoint::cadCanvasMoveEvent( QgsMapMouseEvent *e )
{
QgsPoint mapPoint( e->mapPoint() );
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
if ( mTempRubberBand )
{
QgsRegularPolygon::ConstructionOption option = QgsRegularPolygon::CircumscribedCircle;

0 comments on commit 4bfc7b7

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