Skip to content

Commit 11578cb

Browse files
author
wonder
committed
If map tool implements own deactivate() method, it _should_ call also QgsMapTool::deactivate()
otherwise some things like deactivation of associated action/button won't work properly. git-svn-id: http://svn.osgeo.org/qgis/trunk@9664 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 4c5e483 commit 11578cb

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

src/app/qgsmaptooladdvertex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,6 @@ void QgsMapToolAddVertex::deactivate()
121121
{
122122
delete mRubberBand;
123123
mRubberBand = 0;
124+
125+
QgsMapTool::deactivate();
124126
}

src/app/qgsmaptoolcapture.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ void QgsMapToolCapture::deactivate()
8383
delete mRubberBand;
8484
mRubberBand = 0;
8585
mCaptureList.clear();
86+
87+
QgsMapTool::deactivate();
8688
}
8789

8890
int QgsMapToolCapture::addVertex( const QPoint& p )

src/app/qgsmaptooldeletevertex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,6 @@ void QgsMapToolDeleteVertex::deactivate()
9393
{
9494
delete mCross;
9595
mCross = 0;
96+
97+
QgsMapTool::deactivate();
9698
}

src/app/qgsmaptoolmovefeature.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,4 +150,6 @@ void QgsMapToolMoveFeature::deactivate()
150150
//delete rubber band
151151
delete mRubberBand;
152152
mRubberBand = 0;
153+
154+
QgsMapTool::deactivate();
153155
}

src/app/qgsmaptoolmovevertex.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ void QgsMapToolMoveVertex::canvasReleaseEvent( QMouseEvent * e )
188188
void QgsMapToolMoveVertex::deactivate()
189189
{
190190
removeRubberBands();
191+
192+
QgsMapTool::deactivate();
191193
}
192194

193195
void QgsMapToolMoveVertex::removeRubberBands()

0 commit comments

Comments
 (0)