Skip to content

Commit

Permalink
Only switch Qgis to previous used tool if the current tool is the mov…
Browse files Browse the repository at this point in the history
…e point tool
  • Loading branch information
uclaros authored and nyalldawson committed Jul 13, 2020
1 parent a6c6fa8 commit d176f1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/georeferencer/qgsgeorefmainwindow.cpp
Expand Up @@ -401,14 +401,16 @@ void QgsGeoreferencerMainWindow::generateGDALScript()
void QgsGeoreferencerMainWindow::setAddPointTool()
{
mCanvas->setMapTool( mToolAddPoint );
if ( mPrevQgisMapTool )
QgsMapTool *activeQgisMapTool = QgisApp::instance()->mapCanvas()->mapTool();
if ( activeQgisMapTool == mToolMovePointQgis )
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
}

void QgsGeoreferencerMainWindow::setDeletePointTool()
{
mCanvas->setMapTool( mToolDeletePoint );
if ( mPrevQgisMapTool )
QgsMapTool *activeQgisMapTool = QgisApp::instance()->mapCanvas()->mapTool();
if ( activeQgisMapTool == mToolMovePointQgis )
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
}

Expand Down

0 comments on commit d176f1d

Please sign in to comment.