Skip to content
Permalink
Browse files

Remove rectangle3points (crash)

  • Loading branch information
lbartoletti committed Jul 30, 2017
1 parent 430953c commit 3ae1a2b0681261d2baf637f1dcb0fbba1279acb8
@@ -146,7 +146,6 @@ SET(QGIS_APP_SRCS
qgsmaptooladdregularpolygon.cpp
qgsmaptoolrectanglecenter.cpp
qgsmaptoolrectangleextent.cpp
qgsmaptoolrectangle3points.cpp
qgsmaptoolsquarecenter.cpp
qgsmaptoolregularpolygon2points.cpp
qgsmaptoolregularpolygoncenterpoint.cpp
@@ -315,7 +314,6 @@ SET (QGIS_APP_MOC_HDRS
qgsmaptooladdregularpolygon.h
qgsmaptoolrectanglecenter.h
qgsmaptoolrectangleextent.h
qgsmaptoolrectangle3points.h
qgsmaptoolsquarecenter.h
qgsmaptoolregularpolygon2points.h
qgsmaptoolregularpolygoncenterpoint.h
@@ -336,7 +336,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgsmaptoolellipsecenterpoint.h"
#include "qgsmaptoolellipseextent.h"
#include "qgsmaptoolellipsefoci.h"
#include "qgsmaptoolrectangle3points.h"
#include "qgsmaptoolrectanglecenter.h"
#include "qgsmaptoolrectangleextent.h"
#include "qgsmaptoolsquarecenter.h"
@@ -1387,7 +1386,6 @@ QgisApp::~QgisApp()
delete mMapTools.mEllipseCenterPoint;
delete mMapTools.mEllipseExtent;
delete mMapTools.mEllipseFoci;
delete mMapTools.mRectangle3Points;
delete mMapTools.mRectangleCenterPoint;
delete mMapTools.mRectangleExtent;
delete mMapTools.mSquareCenter;
@@ -1819,7 +1817,6 @@ void QgisApp::createActions()
connect( mActionEllipseCenterPoint, &QAction::triggered, this, &QgisApp::ellipseCenterPoint );
connect( mActionEllipseExtent, &QAction::triggered, this, &QgisApp::ellipseExtent );
connect( mActionEllipseFoci, &QAction::triggered, this, &QgisApp::ellipseFoci );
connect( mActionRectangle3Points, &QAction::triggered, this, &QgisApp::rectangle3Points );
connect( mActionRectangleCenterPoint, &QAction::triggered, this, &QgisApp::rectangleCenterPoint );
connect( mActionRectangleExtent, &QAction::triggered, this, &QgisApp::rectangleExtent );
connect( mActionSquareCenter, &QAction::triggered, this, &QgisApp::squareCenter );
@@ -2106,7 +2103,6 @@ void QgisApp::createActionGroups()
mMapToolGroup->addAction( mActionEllipseCenterPoint );
mMapToolGroup->addAction( mActionEllipseExtent );
mMapToolGroup->addAction( mActionEllipseFoci );
mMapToolGroup->addAction( mActionRectangle3Points );
mMapToolGroup->addAction( mActionRectangleCenterPoint );
mMapToolGroup->addAction( mActionRectangleExtent );
mMapToolGroup->addAction( mActionSquareCenter );
@@ -2604,11 +2600,10 @@ void QgisApp::createToolBars()
//Rectangle digitize tool button
QToolButton *tbAddRectangle = new QToolButton( mRegularShapeDigitizeToolBar );
tbAddRectangle->setPopupMode( QToolButton::MenuButtonPopup );
tbAddRectangle->addAction( mActionRectangle3Points );
tbAddRectangle->addAction( mActionRectangleCenterPoint );
tbAddRectangle->addAction( mActionRectangleExtent );
tbAddRectangle->addAction( mActionSquareCenter );
tbAddRectangle->setDefaultAction( mActionRectangleExtent );
tbAddRectangle->setDefaultAction( mActionRectangleCenterPoint );
connect( tbAddRectangle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddRectangle );

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

void QgisApp::rectangle3Points()
{
mMapCanvas->setMapTool( mMapTools.mRectangle3Points );
}

void QgisApp::rectangleCenterPoint()
{
mMapCanvas->setMapTool( mMapTools.mRectangleCenterPoint );
@@ -11260,7 +11248,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionEllipseCenterPoint->setEnabled( false );
mActionEllipseExtent->setEnabled( false );
mActionEllipseFoci->setEnabled( false );
mActionRectangle3Points->setEnabled( false );
mActionRectangleCenterPoint->setEnabled( false );
mActionRectangleExtent->setEnabled( false );
mActionSquareCenter->setEnabled( false );
@@ -11415,8 +11402,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionEllipseFoci->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionRectangle3Points->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionRectangleCenterPoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionRectangleExtent->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
@@ -1211,8 +1211,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void ellipseExtent();
//! activates the add ellipse from foci tool
void ellipseFoci();
//! activates the add rectangle from 3 points tool
void rectangle3Points();
//! activates the add rectangle from center and a point tool
void rectangleCenterPoint();
//! activates the add rectangle from extent tool
@@ -1778,7 +1776,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
, mEllipseCenterPoint( nullptr )
, mEllipseExtent( nullptr )
, mEllipseFoci( nullptr )
, mRectangle3Points( nullptr )
, mRectangleCenterPoint( nullptr )
, mRectangleExtent( nullptr )
, mSquareCenter( nullptr )
@@ -1837,7 +1834,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QgsMapTool *mEllipseCenterPoint = nullptr;
QgsMapTool *mEllipseExtent = nullptr;
QgsMapTool *mEllipseFoci = nullptr;
QgsMapTool *mRectangle3Points = nullptr;
QgsMapTool *mRectangleCenterPoint = nullptr;
QgsMapTool *mRectangleExtent = nullptr;
QgsMapTool *mSquareCenter = nullptr;

This file was deleted.

This file was deleted.

@@ -295,7 +295,6 @@
</property>
<addaction name="mActionRectangleExtent"/>
<addaction name="mActionRectangleCenterPoint"/>
<addaction name="mActionRectangle3Points"/>
<addaction name="mActionSquareCenter"/>
</widget>
<widget class="QMenu" name="mMenuRegularPolygon">
@@ -2832,7 +2831,7 @@ Acts on currently active editable layer</string>
<normaloff>:/images/themes/default/mActionRectangleExtent.svg</normaloff>:/images/themes/default/mActionRectangleExtent.svg</iconset>
</property>
<property name="text">
<string>Add Rectangle From Extent</string>
<string>&amp;Add Rectangle From Extent</string>
</property>
<property name="toolTip">
<string>Add rectangle from extent</string>
@@ -2847,27 +2846,12 @@ Acts on currently active editable layer</string>
<normaloff>:/images/themes/default/mActionRectangleCenter.svg</normaloff>:/images/themes/default/mActionRectangleCenter.svg</iconset>
</property>
<property name="text">
<string>Add Rectangle From Center and a Point</string>
<string>Add &amp;Rectangle From Center and a Point</string>
</property>
<property name="toolTip">
<string>Add rectangle from center and a point</string>
</property>
</action>
<action name="mActionRectangle3Points">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionRectangle3Points.svg</normaloff>:/images/themes/default/mActionRectangle3Points.svg</iconset>
</property>
<property name="text">
<string>Add Rectangle From 3 Points</string>
</property>
<property name="toolTip">
<string>Add rectangle from 3 points</string>
</property>
</action>
<action name="mActionSquareCenter">
<property name="checkable">
<bool>true</bool>
@@ -2877,7 +2861,7 @@ Acts on currently active editable layer</string>
<normaloff>:/images/themes/default/mActionSquareCenter.svg</normaloff>:/images/themes/default/mActionSquareCenter.svg</iconset>
</property>
<property name="text">
<string>Add Square From Center</string>
<string>Add &amp;Square From Center</string>
</property>
<property name="toolTip">
<string>Add square from center</string>
@@ -2892,7 +2876,7 @@ Acts on currently active editable layer</string>
<normaloff>:/images/themes/default/mActionRegularPolygonCenterPoint.svg</normaloff>:/images/themes/default/mActionRegularPolygonCenterPoint.svg</iconset>
</property>
<property name="text">
<string>Add Regular Polygon From Center and a Point</string>
<string>&amp;Add Regular Polygon From Center and a Point</string>
</property>
<property name="toolTip">
<string>Add regular polygon from center and a point</string>
@@ -2907,7 +2891,7 @@ Acts on currently active editable layer</string>
<normaloff>:/images/themes/default/mActionRegularPolygon2Points.svg</normaloff>:/images/themes/default/mActionRegularPolygon2Points.svg</iconset>
</property>
<property name="text">
<string>Add Regular Polygon From 2 Points</string>
<string>Add &amp;Regular Polygon From 2 Points</string>
</property>
<property name="toolTip">
<string>Add regular polygon from 2 points</string>

0 comments on commit 3ae1a2b

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