@@ -336,7 +336,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
336
336
#include " qgsmaptoolellipsecenterpoint.h"
337
337
#include " qgsmaptoolellipseextent.h"
338
338
#include " qgsmaptoolellipsefoci.h"
339
- #include " qgsmaptoolrectangle3points.h"
340
339
#include " qgsmaptoolrectanglecenter.h"
341
340
#include " qgsmaptoolrectangleextent.h"
342
341
#include " qgsmaptoolsquarecenter.h"
@@ -1387,7 +1386,6 @@ QgisApp::~QgisApp()
1387
1386
delete mMapTools .mEllipseCenterPoint ;
1388
1387
delete mMapTools .mEllipseExtent ;
1389
1388
delete mMapTools .mEllipseFoci ;
1390
- delete mMapTools .mRectangle3Points ;
1391
1389
delete mMapTools .mRectangleCenterPoint ;
1392
1390
delete mMapTools .mRectangleExtent ;
1393
1391
delete mMapTools .mSquareCenter ;
@@ -1819,7 +1817,6 @@ void QgisApp::createActions()
1819
1817
connect ( mActionEllipseCenterPoint , &QAction::triggered, this , &QgisApp::ellipseCenterPoint );
1820
1818
connect ( mActionEllipseExtent , &QAction::triggered, this , &QgisApp::ellipseExtent );
1821
1819
connect ( mActionEllipseFoci , &QAction::triggered, this , &QgisApp::ellipseFoci );
1822
- connect ( mActionRectangle3Points , &QAction::triggered, this , &QgisApp::rectangle3Points );
1823
1820
connect ( mActionRectangleCenterPoint , &QAction::triggered, this , &QgisApp::rectangleCenterPoint );
1824
1821
connect ( mActionRectangleExtent , &QAction::triggered, this , &QgisApp::rectangleExtent );
1825
1822
connect ( mActionSquareCenter , &QAction::triggered, this , &QgisApp::squareCenter );
@@ -2106,7 +2103,6 @@ void QgisApp::createActionGroups()
2106
2103
mMapToolGroup ->addAction ( mActionEllipseCenterPoint );
2107
2104
mMapToolGroup ->addAction ( mActionEllipseExtent );
2108
2105
mMapToolGroup ->addAction ( mActionEllipseFoci );
2109
- mMapToolGroup ->addAction ( mActionRectangle3Points );
2110
2106
mMapToolGroup ->addAction ( mActionRectangleCenterPoint );
2111
2107
mMapToolGroup ->addAction ( mActionRectangleExtent );
2112
2108
mMapToolGroup ->addAction ( mActionSquareCenter );
@@ -2604,11 +2600,10 @@ void QgisApp::createToolBars()
2604
2600
// Rectangle digitize tool button
2605
2601
QToolButton *tbAddRectangle = new QToolButton ( mRegularShapeDigitizeToolBar );
2606
2602
tbAddRectangle->setPopupMode ( QToolButton::MenuButtonPopup );
2607
- tbAddRectangle->addAction ( mActionRectangle3Points );
2608
2603
tbAddRectangle->addAction ( mActionRectangleCenterPoint );
2609
2604
tbAddRectangle->addAction ( mActionRectangleExtent );
2610
2605
tbAddRectangle->addAction ( mActionSquareCenter );
2611
- tbAddRectangle->setDefaultAction ( mActionRectangleExtent );
2606
+ tbAddRectangle->setDefaultAction ( mActionRectangleCenterPoint );
2612
2607
connect ( tbAddRectangle, &QToolButton::triggered, this , &QgisApp::toolButtonActionTriggered );
2613
2608
mRegularShapeDigitizeToolBar ->insertWidget ( mActionNodeTool , tbAddRectangle );
2614
2609
@@ -3216,8 +3211,6 @@ void QgisApp::createCanvasTools()
3216
3211
mMapTools .mEllipseExtent ->setAction ( mActionEllipseExtent );
3217
3212
mMapTools .mEllipseFoci = new QgsMapToolEllipseFoci ( dynamic_cast <QgsMapToolAddFeature *>( mMapTools .mAddFeature ), mMapCanvas );
3218
3213
mMapTools .mEllipseFoci ->setAction ( mActionEllipseFoci );
3219
- mMapTools .mRectangle3Points = new QgsMapToolRectangle3Points ( dynamic_cast <QgsMapToolAddFeature *>( mMapTools .mAddFeature ), mMapCanvas );
3220
- mMapTools .mRectangle3Points ->setAction ( mActionRectangle3Points );
3221
3214
mMapTools .mRectangleCenterPoint = new QgsMapToolRectangleCenter ( dynamic_cast <QgsMapToolAddFeature *>( mMapTools .mAddFeature ), mMapCanvas );
3222
3215
mMapTools .mRectangleCenterPoint ->setAction ( mActionRectangleCenterPoint );
3223
3216
mMapTools .mRectangleExtent = new QgsMapToolRectangleExtent ( dynamic_cast <QgsMapToolAddFeature *>( mMapTools .mAddFeature ), mMapCanvas );
@@ -7939,11 +7932,6 @@ void QgisApp::ellipseFoci()
7939
7932
mMapCanvas ->setMapTool ( mMapTools .mEllipseFoci );
7940
7933
}
7941
7934
7942
- void QgisApp::rectangle3Points ()
7943
- {
7944
- mMapCanvas ->setMapTool ( mMapTools .mRectangle3Points );
7945
- }
7946
-
7947
7935
void QgisApp::rectangleCenterPoint ()
7948
7936
{
7949
7937
mMapCanvas ->setMapTool ( mMapTools .mRectangleCenterPoint );
@@ -11260,7 +11248,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
11260
11248
mActionEllipseCenterPoint ->setEnabled ( false );
11261
11249
mActionEllipseExtent ->setEnabled ( false );
11262
11250
mActionEllipseFoci ->setEnabled ( false );
11263
- mActionRectangle3Points ->setEnabled ( false );
11264
11251
mActionRectangleCenterPoint ->setEnabled ( false );
11265
11252
mActionRectangleExtent ->setEnabled ( false );
11266
11253
mActionSquareCenter ->setEnabled ( false );
@@ -11415,8 +11402,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
11415
11402
&& ( vlayer->geometryType () == QgsWkbTypes::LineGeometry || vlayer->geometryType () == QgsWkbTypes::PolygonGeometry ) );
11416
11403
mActionEllipseFoci ->setEnabled ( isEditable && ( canAddFeatures || canChangeGeometry )
11417
11404
&& ( vlayer->geometryType () == QgsWkbTypes::LineGeometry || vlayer->geometryType () == QgsWkbTypes::PolygonGeometry ) );
11418
- mActionRectangle3Points ->setEnabled ( isEditable && ( canAddFeatures || canChangeGeometry )
11419
- && ( vlayer->geometryType () == QgsWkbTypes::LineGeometry || vlayer->geometryType () == QgsWkbTypes::PolygonGeometry ) );
11420
11405
mActionRectangleCenterPoint ->setEnabled ( isEditable && ( canAddFeatures || canChangeGeometry )
11421
11406
&& ( vlayer->geometryType () == QgsWkbTypes::LineGeometry || vlayer->geometryType () == QgsWkbTypes::PolygonGeometry ) );
11422
11407
mActionRectangleExtent ->setEnabled ( isEditable && ( canAddFeatures || canChangeGeometry )
0 commit comments