Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Geometry checker] Fix the error resolution ui. Fixes #42489
method.id() always returns 0, I put back the old mechanism which works.
  • Loading branch information
lbartoletti authored and m-kuhn committed Jun 5, 2021
1 parent e187d7f commit bc34d15
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 bc34d15

Please sign in to comment.