Skip to content

Commit

Permalink
[Geometry checker] Fix the error resolution ui. Fixes #42489
Browse files Browse the repository at this point in the history
method.id() always returns 0, I put back the old mechanism which works.
  • Loading branch information
lbartoletti authored and nyalldawson committed Jun 21, 2021
1 parent e82015b commit 16161cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/geometry_checker/qgsgeometrycheckerresulttab.cpp
Expand Up @@ -586,12 +586,13 @@ void QgsGeometryCheckerResultTab::setDefaultResolutionMethods()
radioGroup->setProperty( "errorType", check->id() );
int checkedId = QgsSettings().value( sSettingsGroup + check->id(), QVariant::fromValue<int>( 0 ) ).toInt();
const QList<QgsGeometryCheckResolutionMethod> resolutionMethods = check->availableResolutionMethods();
int id = 0;
for ( const QgsGeometryCheckResolutionMethod &method : resolutionMethods )
{
QRadioButton *radio = new QRadioButton( method.name(), groupBox );
radio->setChecked( method.id() == checkedId );
radio->setChecked( id == checkedId );
groupBoxLayout->addWidget( radio );
radioGroup->addButton( radio, method.id() );
radioGroup->addButton( radio, id++ );
}
connect( radioGroup, static_cast<void ( QButtonGroup::* )( int )>( &QButtonGroup::buttonClicked ), this, &QgsGeometryCheckerResultTab::storeDefaultResolutionMethod );

Expand Down

0 comments on commit 16161cb

Please sign in to comment.