Skip to content

Commit

Permalink
If map tool implements own deactivate() method, it _should_ call also…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
wonder committed Nov 18, 2008
1 parent 4c5e483 commit 11578cb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsmaptooladdvertex.cpp
Expand Up @@ -121,4 +121,6 @@ void QgsMapToolAddVertex::deactivate()
{
delete mRubberBand;
mRubberBand = 0;

QgsMapTool::deactivate();
}
2 changes: 2 additions & 0 deletions src/app/qgsmaptoolcapture.cpp
Expand Up @@ -83,6 +83,8 @@ void QgsMapToolCapture::deactivate()
delete mRubberBand;
mRubberBand = 0;
mCaptureList.clear();

QgsMapTool::deactivate();
}

int QgsMapToolCapture::addVertex( const QPoint& p )
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsmaptooldeletevertex.cpp
Expand Up @@ -93,4 +93,6 @@ void QgsMapToolDeleteVertex::deactivate()
{
delete mCross;
mCross = 0;

QgsMapTool::deactivate();
}
2 changes: 2 additions & 0 deletions src/app/qgsmaptoolmovefeature.cpp
Expand Up @@ -150,4 +150,6 @@ void QgsMapToolMoveFeature::deactivate()
//delete rubber band
delete mRubberBand;
mRubberBand = 0;

QgsMapTool::deactivate();
}
2 changes: 2 additions & 0 deletions src/app/qgsmaptoolmovevertex.cpp
Expand Up @@ -188,6 +188,8 @@ void QgsMapToolMoveVertex::canvasReleaseEvent( QMouseEvent * e )
void QgsMapToolMoveVertex::deactivate()
{
removeRubberBands();

QgsMapTool::deactivate();
}

void QgsMapToolMoveVertex::removeRubberBands()
Expand Down

0 comments on commit 11578cb

Please sign in to comment.