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/qgis@9664 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 18, 2008
1 parent 83678fc commit d07dced
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 d07dced

Please sign in to comment.