Skip to content
Permalink
Browse files
[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 nyalldawson committed Jun 21, 2021
1 parent e82015b commit 16161cb3b2bdc97474c244ab6e5d08af1e87edeb
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/plugins/geometry_checker/qgsgeometrycheckerresulttab.cpp
@@ -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 );

0 comments on commit 16161cb

Please sign in to comment.