Skip to content
Permalink
Browse files

Check if previous map tool is nullptr

  • Loading branch information
uclaros authored and nyalldawson committed Jul 13, 2020
1 parent 622e9a8 commit a6c6fa805cfb456fc2ec3f982f67fc9386d89707
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/georeferencer/qgsgeorefmainwindow.cpp
@@ -401,13 +401,15 @@ void QgsGeoreferencerMainWindow::generateGDALScript()
void QgsGeoreferencerMainWindow::setAddPointTool()
{
mCanvas->setMapTool( mToolAddPoint );
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
if ( mPrevQgisMapTool )
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
}

void QgsGeoreferencerMainWindow::setDeletePointTool()
{
mCanvas->setMapTool( mToolDeletePoint );
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
if ( mPrevQgisMapTool )
QgisApp::instance()->mapCanvas()->setMapTool( mPrevQgisMapTool );
}

void QgsGeoreferencerMainWindow::setMovePointTool()

0 comments on commit a6c6fa8

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