Skip to content

Commit

Permalink
Add Z support to AddRegularPolygon map tools
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Feb 16, 2018
1 parent 4c6d03c commit 4bfc7b7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolregularpolygon2points.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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() );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolregularpolygoncentercorner.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolregularpolygoncenterpoint.cpp
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4bfc7b7

Please sign in to comment.