mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -04:00
Fix #15829 georeferencer - resolve logical error during loadGCPs
This commit is contained in:
parent
be4c8156c6
commit
59a0e2fb88
@ -1258,20 +1258,31 @@ bool QgsGeorefPluginGui::loadGCPs( /*bool verbose*/ )
|
|||||||
|
|
||||||
QgsPoint mapCoords( ls.at( 0 ).toDouble(), ls.at( 1 ).toDouble() ); // map x,y
|
QgsPoint mapCoords( ls.at( 0 ).toDouble(), ls.at( 1 ).toDouble() ); // map x,y
|
||||||
QgsPoint pixelCoords( ls.at( 2 ).toDouble(), ls.at( 3 ).toDouble() ); // pixel x,y
|
QgsPoint pixelCoords( ls.at( 2 ).toDouble(), ls.at( 3 ).toDouble() ); // pixel x,y
|
||||||
|
QgsGeorefDataPoint* pnt;
|
||||||
if ( ls.count() == 5 )
|
if ( ls.count() == 5 )
|
||||||
{
|
{
|
||||||
bool enable = ls.at( 4 ).toInt();
|
bool enable = ls.at( 4 ).toInt();
|
||||||
addPoint( pixelCoords, mapCoords, enable, false/*, verbose*/ ); // enabled
|
pnt = new QgsGeorefDataPoint( mCanvas, mIface->mapCanvas(), pixelCoords, mapCoords, enable );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
addPoint( pixelCoords, mapCoords, true, false );
|
pnt = new QgsGeorefDataPoint( mCanvas, mIface->mapCanvas(), pixelCoords, mapCoords, true );
|
||||||
|
|
||||||
|
mPoints.append( pnt );
|
||||||
|
connect( mCanvas, SIGNAL( extentsChanged() ), pnt, SLOT( updateCoords() ) );
|
||||||
|
mGCPsDirty = true;
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
mInitialPoints = mPoints;
|
mInitialPoints = mPoints;
|
||||||
// showMessageInLog(tr("GCP points loaded from"), mGCPpointsFileName);
|
// showMessageInLog(tr("GCP points loaded from"), mGCPpointsFileName);
|
||||||
|
if ( mGCPsDirty )
|
||||||
|
{
|
||||||
|
mGCPListWidget->setGCPList( &mPoints );
|
||||||
|
updateGeorefTransform();
|
||||||
mCanvas->refresh();
|
mCanvas->refresh();
|
||||||
|
mIface->mapCanvas()->refresh();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user