Skip to content

Commit

Permalink
georeferencer: Fix parameter reporting when enabling/disabling GCPs.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mmassing committed May 23, 2010
1 parent 3bfe932 commit 65ddd54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions src/plugins/georeferencer/qgsgcplistwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,14 @@ void QgsGCPListWidget::itemClicked( QModelIndex index )
if ( item->checkState() == Qt::Checked )
{
p->setEnabled( true );
emit pointEnabled( p, index.row() );
}
else // Qt::Unchecked
{
p->setEnabled( false );
emit pointEnabled( p, index.row() );
}

mGCPListModel->updateModel();
emit pointEnabled( p, index.row() );
adjustTableContent();
}

Expand Down
10 changes: 0 additions & 10 deletions src/plugins/georeferencer/qgsgeorefplugingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,16 +1345,6 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
parameterLabel->setSceneRect( QRectF( 2, composerMap->rect().bottom() + composerMap->transform().dy() + 5, composition->paperWidth(), 8 ) );
parameterLabel->setFrame( false );

int nPointsEnabled = 0;
QgsGCPList::const_iterator gcpIt = mPoints.constBegin();
for ( ; gcpIt != mPoints.constEnd(); ++gcpIt )
{
if (( *gcpIt )->isEnabled() )
{
++nPointsEnabled;
}
}

//calculate mean error
double meanError = 0;
calculateMeanError( meanError );
Expand Down

0 comments on commit 65ddd54

Please sign in to comment.