Skip to content
Permalink
Browse files

Disconnect QgsMapTool::destroyed also when tool is unset via QgsMapCa…

…nvas::unsetMapTool

Ensures consistent behaviour with when tool is replaced in QgsMapCanvas::setMapTool.
  • Loading branch information
manisandro authored and nyalldawson committed May 2, 2019
1 parent 0c83435 commit 4667152d84e5052a17c45907b4043cbd8d19d353
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/gui/qgsmapcanvas.cpp
@@ -1784,6 +1784,7 @@ void QgsMapCanvas::unsetMapTool( QgsMapTool *tool )
{
if ( mMapTool && mMapTool == tool )
{
disconnect( mMapTool, &QObject::destroyed, this, &QgsMapCanvas::mapToolDestroyed );
mMapTool->deactivate();
mMapTool = nullptr;
emit mapToolSet( nullptr, mMapTool );

0 comments on commit 4667152

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