Skip to content
Permalink
Browse files

apply suggstions

  • Loading branch information
roya0045 authored and nyalldawson committed Feb 9, 2021
1 parent 97b0cb8 commit ae32b3dfe4f226d711782e7c631212b005c258f2
Showing with 3 additions and 9 deletions.
  1. +2 −8 src/app/georeferencer/qgsgcpcanvasitem.cpp
  2. +1 −1 src/app/georeferencer/qgsgeorefmainwindow.cpp
@@ -168,14 +168,8 @@ void QgsGCPCanvasItem::updatePosition()
if ( mDataPoint->canvasCoords().isEmpty() )
{
QgsCoordinateReferenceSystem mapCrs = mMapCanvas->mapSettings().destinationCrs();
QgsPointXY mapCoords;
if ( mapCrs.toWkt() == mDataPoint->crs().toWkt() )
mapCoords = mDataPoint->mapCoords();
else
{
QgsCoordinateTransform transf( mDataPoint->crs(), mapCrs, QgsProject::instance() );
mapCoords = transf.transform( mDataPoint->mapCoords() );
}
QgsCoordinateTransform transf( mDataPoint->crs(), mapCrs, QgsProject::instance() );
QgsPointXY mapCoords = transf.transform( mDataPoint->mapCoords() );
mDataPoint->setCanvasCoords( mapCoords );
}
setPos( toCanvasCoordinates( mDataPoint->canvasCoords() ) );
@@ -542,7 +542,7 @@ void QgsGeoreferencerMainWindow::addPoint( const QgsPointXY &pixelCoords, const
{
QgsGeorefDataPoint *pnt = new QgsGeorefDataPoint( mCanvas, QgisApp::instance()->mapCanvas(), pixelCoords, mapCoords, crs, enable );
mPoints.append( pnt );
if ( !mLastGCPProjection.isValid() || mLastGCPProjection.toWkt() != crs.toWkt() )
if ( !mLastGCPProjection.isValid() || mLastGCPProjection != crs )
mLastGCPProjection = QgsCoordinateReferenceSystem( crs );
mGCPsDirty = true;
if ( finalize )

0 comments on commit ae32b3d

Please sign in to comment.