Skip to content

Commit d377970

Browse files
committed
Requests for QgsMapToolAddCircle
1 parent 79a2fd7 commit d377970

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/app/qgsmaptooladdcircle.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
QgsMapToolAddCircle::QgsMapToolAddCircle( QgsMapToolCapture *parentTool, QgsMapCanvas *canvas, CaptureMode mode )
2727
: QgsMapToolCapture( canvas, QgisApp::instance()->cadDockWidget(), mode )
2828
, mParentTool( parentTool )
29-
, mCircle( QgsCircle() )
3029
{
3130
clean();
3231
}

src/app/qgsmaptooladdcircle.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct EdgesOnlyFilter : public QgsPointLocator::MatchFilter
2929
class QgsMapToolAddCircle: public QgsMapToolCapture
3030
{
3131
Q_OBJECT
32-
void clean();
32+
3333
public:
3434
QgsMapToolAddCircle( QgsMapToolCapture *parentTool, QgsMapCanvas *canvas, CaptureMode mode = CaptureLine );
3535
~QgsMapToolAddCircle();
@@ -38,22 +38,24 @@ class QgsMapToolAddCircle: public QgsMapToolCapture
3838
void keyReleaseEvent( QKeyEvent *e ) override;
3939

4040
void deactivate() override;
41-
4241
void activate() override;
4342

4443
protected:
45-
explicit QgsMapToolAddCircle( QgsMapCanvas *canvas ); //forbidden
44+
explicit QgsMapToolAddCircle( QgsMapCanvas *canvas ) = delete; //forbidden
4645

4746
/** The parent map tool, e.g. the add feature tool.
4847
* Completed circle will be added to this tool by calling its addCurve() method.
4948
* */
50-
QgsMapToolCapture *mParentTool;
49+
QgsMapToolCapture *mParentTool = nullptr;
5150
//! Circle points (in map coordinates)
5251
QgsPointSequence mPoints;
5352
//! The rubberband to show the circular string currently working on
5453
QgsGeometryRubberBand *mTempRubberBand = nullptr;
5554
//! Circle
5655
QgsCircle mCircle;
56+
57+
private:
58+
void clean();
5759
};
5860

5961
#endif // QGSMAPTOOLADDCIRCLE_H

0 commit comments

Comments
 (0)