Skip to content

Commit 65ddd54

Browse files
author
mmassing
committed
georeferencer: Fix parameter reporting when enabling/disabling GCPs.
Updates the model before emiting pointEnabled signal, so that downstream handlers work with up-to-date transform parameters. git-svn-id: http://svn.osgeo.org/qgis/trunk@13554 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3bfe932 commit 65ddd54

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

‎src/plugins/georeferencer/qgsgcplistwidget.cpp‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,14 @@ void QgsGCPListWidget::itemClicked( QModelIndex index )
109109
if ( item->checkState() == Qt::Checked )
110110
{
111111
p->setEnabled( true );
112-
emit pointEnabled( p, index.row() );
113112
}
114113
else // Qt::Unchecked
115114
{
116115
p->setEnabled( false );
117-
emit pointEnabled( p, index.row() );
118116
}
119117

120118
mGCPListModel->updateModel();
119+
emit pointEnabled( p, index.row() );
121120
adjustTableContent();
122121
}
123122

‎src/plugins/georeferencer/qgsgeorefplugingui.cpp‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,16 +1345,6 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
13451345
parameterLabel->setSceneRect( QRectF( 2, composerMap->rect().bottom() + composerMap->transform().dy() + 5, composition->paperWidth(), 8 ) );
13461346
parameterLabel->setFrame( false );
13471347

1348-
int nPointsEnabled = 0;
1349-
QgsGCPList::const_iterator gcpIt = mPoints.constBegin();
1350-
for ( ; gcpIt != mPoints.constEnd(); ++gcpIt )
1351-
{
1352-
if (( *gcpIt )->isEnabled() )
1353-
{
1354-
++nPointsEnabled;
1355-
}
1356-
}
1357-
13581348
//calculate mean error
13591349
double meanError = 0;
13601350
calculateMeanError( meanError );

0 commit comments

Comments
 (0)