Skip to content

Commit 3ae1a2b

Browse files
committedJul 30, 2017
Remove rectangle3points (crash)
1 parent 430953c commit 3ae1a2b

File tree

6 files changed

+6
-185
lines changed

6 files changed

+6
-185
lines changed
 

‎src/app/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ SET(QGIS_APP_SRCS
146146
qgsmaptooladdregularpolygon.cpp
147147
qgsmaptoolrectanglecenter.cpp
148148
qgsmaptoolrectangleextent.cpp
149-
qgsmaptoolrectangle3points.cpp
150149
qgsmaptoolsquarecenter.cpp
151150
qgsmaptoolregularpolygon2points.cpp
152151
qgsmaptoolregularpolygoncenterpoint.cpp
@@ -315,7 +314,6 @@ SET (QGIS_APP_MOC_HDRS
315314
qgsmaptooladdregularpolygon.h
316315
qgsmaptoolrectanglecenter.h
317316
qgsmaptoolrectangleextent.h
318-
qgsmaptoolrectangle3points.h
319317
qgsmaptoolsquarecenter.h
320318
qgsmaptoolregularpolygon2points.h
321319
qgsmaptoolregularpolygoncenterpoint.h

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
336336
#include "qgsmaptoolellipsecenterpoint.h"
337337
#include "qgsmaptoolellipseextent.h"
338338
#include "qgsmaptoolellipsefoci.h"
339-
#include "qgsmaptoolrectangle3points.h"
340339
#include "qgsmaptoolrectanglecenter.h"
341340
#include "qgsmaptoolrectangleextent.h"
342341
#include "qgsmaptoolsquarecenter.h"
@@ -1387,7 +1386,6 @@ QgisApp::~QgisApp()
13871386
delete mMapTools.mEllipseCenterPoint;
13881387
delete mMapTools.mEllipseExtent;
13891388
delete mMapTools.mEllipseFoci;
1390-
delete mMapTools.mRectangle3Points;
13911389
delete mMapTools.mRectangleCenterPoint;
13921390
delete mMapTools.mRectangleExtent;
13931391
delete mMapTools.mSquareCenter;
@@ -1819,7 +1817,6 @@ void QgisApp::createActions()
18191817
connect( mActionEllipseCenterPoint, &QAction::triggered, this, &QgisApp::ellipseCenterPoint );
18201818
connect( mActionEllipseExtent, &QAction::triggered, this, &QgisApp::ellipseExtent );
18211819
connect( mActionEllipseFoci, &QAction::triggered, this, &QgisApp::ellipseFoci );
1822-
connect( mActionRectangle3Points, &QAction::triggered, this, &QgisApp::rectangle3Points );
18231820
connect( mActionRectangleCenterPoint, &QAction::triggered, this, &QgisApp::rectangleCenterPoint );
18241821
connect( mActionRectangleExtent, &QAction::triggered, this, &QgisApp::rectangleExtent );
18251822
connect( mActionSquareCenter, &QAction::triggered, this, &QgisApp::squareCenter );
@@ -2106,7 +2103,6 @@ void QgisApp::createActionGroups()
21062103
mMapToolGroup->addAction( mActionEllipseCenterPoint );
21072104
mMapToolGroup->addAction( mActionEllipseExtent );
21082105
mMapToolGroup->addAction( mActionEllipseFoci );
2109-
mMapToolGroup->addAction( mActionRectangle3Points );
21102106
mMapToolGroup->addAction( mActionRectangleCenterPoint );
21112107
mMapToolGroup->addAction( mActionRectangleExtent );
21122108
mMapToolGroup->addAction( mActionSquareCenter );
@@ -2604,11 +2600,10 @@ void QgisApp::createToolBars()
26042600
//Rectangle digitize tool button
26052601
QToolButton *tbAddRectangle = new QToolButton( mRegularShapeDigitizeToolBar );
26062602
tbAddRectangle->setPopupMode( QToolButton::MenuButtonPopup );
2607-
tbAddRectangle->addAction( mActionRectangle3Points );
26082603
tbAddRectangle->addAction( mActionRectangleCenterPoint );
26092604
tbAddRectangle->addAction( mActionRectangleExtent );
26102605
tbAddRectangle->addAction( mActionSquareCenter );
2611-
tbAddRectangle->setDefaultAction( mActionRectangleExtent );
2606+
tbAddRectangle->setDefaultAction( mActionRectangleCenterPoint );
26122607
connect( tbAddRectangle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
26132608
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddRectangle );
26142609

@@ -3216,8 +3211,6 @@ void QgisApp::createCanvasTools()
32163211
mMapTools.mEllipseExtent->setAction( mActionEllipseExtent );
32173212
mMapTools.mEllipseFoci = new QgsMapToolEllipseFoci( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
32183213
mMapTools.mEllipseFoci->setAction( mActionEllipseFoci );
3219-
mMapTools.mRectangle3Points = new QgsMapToolRectangle3Points( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
3220-
mMapTools.mRectangle3Points->setAction( mActionRectangle3Points );
32213214
mMapTools.mRectangleCenterPoint = new QgsMapToolRectangleCenter( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
32223215
mMapTools.mRectangleCenterPoint->setAction( mActionRectangleCenterPoint );
32233216
mMapTools.mRectangleExtent = new QgsMapToolRectangleExtent( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
@@ -7939,11 +7932,6 @@ void QgisApp::ellipseFoci()
79397932
mMapCanvas->setMapTool( mMapTools.mEllipseFoci );
79407933
}
79417934

7942-
void QgisApp::rectangle3Points()
7943-
{
7944-
mMapCanvas->setMapTool( mMapTools.mRectangle3Points );
7945-
}
7946-
79477935
void QgisApp::rectangleCenterPoint()
79487936
{
79497937
mMapCanvas->setMapTool( mMapTools.mRectangleCenterPoint );
@@ -11260,7 +11248,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1126011248
mActionEllipseCenterPoint->setEnabled( false );
1126111249
mActionEllipseExtent->setEnabled( false );
1126211250
mActionEllipseFoci->setEnabled( false );
11263-
mActionRectangle3Points->setEnabled( false );
1126411251
mActionRectangleCenterPoint->setEnabled( false );
1126511252
mActionRectangleExtent->setEnabled( false );
1126611253
mActionSquareCenter->setEnabled( false );
@@ -11415,8 +11402,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1141511402
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
1141611403
mActionEllipseFoci->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
1141711404
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
11418-
mActionRectangle3Points->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
11419-
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
1142011405
mActionRectangleCenterPoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
1142111406
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
1142211407
mActionRectangleExtent->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )

‎src/app/qgisapp.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,8 +1211,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
12111211
void ellipseExtent();
12121212
//! activates the add ellipse from foci tool
12131213
void ellipseFoci();
1214-
//! activates the add rectangle from 3 points tool
1215-
void rectangle3Points();
12161214
//! activates the add rectangle from center and a point tool
12171215
void rectangleCenterPoint();
12181216
//! activates the add rectangle from extent tool
@@ -1778,7 +1776,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
17781776
, mEllipseCenterPoint( nullptr )
17791777
, mEllipseExtent( nullptr )
17801778
, mEllipseFoci( nullptr )
1781-
, mRectangle3Points( nullptr )
17821779
, mRectangleCenterPoint( nullptr )
17831780
, mRectangleExtent( nullptr )
17841781
, mSquareCenter( nullptr )
@@ -1837,7 +1834,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
18371834
QgsMapTool *mEllipseCenterPoint = nullptr;
18381835
QgsMapTool *mEllipseExtent = nullptr;
18391836
QgsMapTool *mEllipseFoci = nullptr;
1840-
QgsMapTool *mRectangle3Points = nullptr;
18411837
QgsMapTool *mRectangleCenterPoint = nullptr;
18421838
QgsMapTool *mRectangleExtent = nullptr;
18431839
QgsMapTool *mSquareCenter = nullptr;

‎src/app/qgsmaptoolrectangle3points.cpp

Lines changed: 0 additions & 109 deletions
This file was deleted.

‎src/app/qgsmaptoolrectangle3points.h

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎src/ui/qgisapp.ui

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@
295295
</property>
296296
<addaction name="mActionRectangleExtent"/>
297297
<addaction name="mActionRectangleCenterPoint"/>
298-
<addaction name="mActionRectangle3Points"/>
299298
<addaction name="mActionSquareCenter"/>
300299
</widget>
301300
<widget class="QMenu" name="mMenuRegularPolygon">
@@ -2832,7 +2831,7 @@ Acts on currently active editable layer</string>
28322831
<normaloff>:/images/themes/default/mActionRectangleExtent.svg</normaloff>:/images/themes/default/mActionRectangleExtent.svg</iconset>
28332832
</property>
28342833
<property name="text">
2835-
<string>Add Rectangle From Extent</string>
2834+
<string>&amp;Add Rectangle From Extent</string>
28362835
</property>
28372836
<property name="toolTip">
28382837
<string>Add rectangle from extent</string>
@@ -2847,27 +2846,12 @@ Acts on currently active editable layer</string>
28472846
<normaloff>:/images/themes/default/mActionRectangleCenter.svg</normaloff>:/images/themes/default/mActionRectangleCenter.svg</iconset>
28482847
</property>
28492848
<property name="text">
2850-
<string>Add Rectangle From Center and a Point</string>
2849+
<string>Add &amp;Rectangle From Center and a Point</string>
28512850
</property>
28522851
<property name="toolTip">
28532852
<string>Add rectangle from center and a point</string>
28542853
</property>
28552854
</action>
2856-
<action name="mActionRectangle3Points">
2857-
<property name="checkable">
2858-
<bool>true</bool>
2859-
</property>
2860-
<property name="icon">
2861-
<iconset resource="../../images/images.qrc">
2862-
<normaloff>:/images/themes/default/mActionRectangle3Points.svg</normaloff>:/images/themes/default/mActionRectangle3Points.svg</iconset>
2863-
</property>
2864-
<property name="text">
2865-
<string>Add Rectangle From 3 Points</string>
2866-
</property>
2867-
<property name="toolTip">
2868-
<string>Add rectangle from 3 points</string>
2869-
</property>
2870-
</action>
28712855
<action name="mActionSquareCenter">
28722856
<property name="checkable">
28732857
<bool>true</bool>
@@ -2877,7 +2861,7 @@ Acts on currently active editable layer</string>
28772861
<normaloff>:/images/themes/default/mActionSquareCenter.svg</normaloff>:/images/themes/default/mActionSquareCenter.svg</iconset>
28782862
</property>
28792863
<property name="text">
2880-
<string>Add Square From Center</string>
2864+
<string>Add &amp;Square From Center</string>
28812865
</property>
28822866
<property name="toolTip">
28832867
<string>Add square from center</string>
@@ -2892,7 +2876,7 @@ Acts on currently active editable layer</string>
28922876
<normaloff>:/images/themes/default/mActionRegularPolygonCenterPoint.svg</normaloff>:/images/themes/default/mActionRegularPolygonCenterPoint.svg</iconset>
28932877
</property>
28942878
<property name="text">
2895-
<string>Add Regular Polygon From Center and a Point</string>
2879+
<string>&amp;Add Regular Polygon From Center and a Point</string>
28962880
</property>
28972881
<property name="toolTip">
28982882
<string>Add regular polygon from center and a point</string>
@@ -2907,7 +2891,7 @@ Acts on currently active editable layer</string>
29072891
<normaloff>:/images/themes/default/mActionRegularPolygon2Points.svg</normaloff>:/images/themes/default/mActionRegularPolygon2Points.svg</iconset>
29082892
</property>
29092893
<property name="text">
2910-
<string>Add Regular Polygon From 2 Points</string>
2894+
<string>Add &amp;Regular Polygon From 2 Points</string>
29112895
</property>
29122896
<property name="toolTip">
29132897
<string>Add regular polygon from 2 points</string>

0 commit comments

Comments
 (0)