Skip to content

Commit 4bfc7b7

Browse files
committedFeb 16, 2018
Add Z support to AddRegularPolygon map tools
1 parent 4c6d03c commit 4bfc7b7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎src/app/qgsmaptoolregularpolygon2points.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ QgsMapToolRegularPolygon2Points::~QgsMapToolRegularPolygon2Points()
3636

3737
void QgsMapToolRegularPolygon2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
3838
{
39-
QgsPoint mapPoint( e->mapPoint() );
39+
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
4040

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

6666
void QgsMapToolRegularPolygon2Points::cadCanvasMoveEvent( QgsMapMouseEvent *e )
6767
{
68-
QgsPoint mapPoint( e->mapPoint() );
68+
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
6969
if ( mTempRubberBand )
7070
{
7171
mRegularPolygon = QgsRegularPolygon( mPoints.at( 0 ), mapPoint, mNumberSidesSpinBox->value() );

‎src/app/qgsmaptoolregularpolygoncentercorner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ QgsMapToolRegularPolygonCenterCorner::~QgsMapToolRegularPolygonCenterCorner()
3333

3434
void QgsMapToolRegularPolygonCenterCorner::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
3535
{
36-
QgsPoint mapPoint( e->mapPoint() );
36+
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
3737

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

6363
void QgsMapToolRegularPolygonCenterCorner::cadCanvasMoveEvent( QgsMapMouseEvent *e )
6464
{
65-
QgsPoint mapPoint( e->mapPoint() );
65+
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
6666
if ( mTempRubberBand )
6767
{
6868
QgsRegularPolygon::ConstructionOption option = QgsRegularPolygon::InscribedCircle;

‎src/app/qgsmaptoolregularpolygoncenterpoint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ QgsMapToolRegularPolygonCenterPoint::~QgsMapToolRegularPolygonCenterPoint()
3333

3434
void QgsMapToolRegularPolygonCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
3535
{
36-
QgsPoint mapPoint( e->mapPoint() );
36+
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
3737

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

6363
void QgsMapToolRegularPolygonCenterPoint::cadCanvasMoveEvent( QgsMapMouseEvent *e )
6464
{
65-
QgsPoint mapPoint( e->mapPoint() );
65+
QgsPoint mapPoint = fromPointXY( e->mapPoint() );
6666
if ( mTempRubberBand )
6767
{
6868
QgsRegularPolygon::ConstructionOption option = QgsRegularPolygon::CircumscribedCircle;

0 commit comments

Comments
 (0)
Please sign in to comment.