Skip to content

Commit

Permalink
Emit QgsMapCanvas::mapToolSet before tool is activated
Browse files Browse the repository at this point in the history
So that QgisApp::mapToolChanged can connect the relevant signals before the tool is actually activated
  • Loading branch information
manisandro authored and nyalldawson committed Jan 16, 2020
1 parent 60b4cad commit 0c83435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvas.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit 0c83435

Please sign in to comment.