Skip to content
Permalink
Browse files

Emit QgsMapCanvas::mapToolSet before tool is activated

So that QgisApp::mapToolChanged can connect the relevant signals before the tool is actually activated
  • Loading branch information
manisandro authored and nyalldawson committed May 2, 2019
1 parent 60b4cad commit 0c83435e2b73f85ea950c5da4d503906636d3cff
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsmapcanvas.cpp
@@ -1771,13 +1771,13 @@ void QgsMapCanvas::setMapTool( QgsMapTool *tool, bool clean )

// set new map tool and activate it
mMapTool = tool;
emit mapToolSet( mMapTool, oldTool );
if ( mMapTool )
{
connect( mMapTool, &QObject::destroyed, this, &QgsMapCanvas::mapToolDestroyed );
mMapTool->activate();
}

emit mapToolSet( mMapTool, oldTool );
} // setMapTool

void QgsMapCanvas::unsetMapTool( QgsMapTool *tool )

0 comments on commit 0c83435

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