@@ -254,9 +254,12 @@ template<> void QgsGeometryCheckFactoryT<QgsGeometryFollowBoundariesCheck>::rest
254
254
255
255
template <> bool QgsGeometryCheckFactoryT<QgsGeometryFollowBoundariesCheck>::checkApplicability( Ui::QgsGeometryCheckerSetupTab &ui, int /* nPoint*/ , int nLineString, int nPolygon ) const
256
256
{
257
- ui.checkBoxFollowBoundaries ->setEnabled ( nLineString + nPolygon > 0 );
258
- ui.checkBoxFollowBoundaries ->setEnabled ( nLineString + nPolygon > 0 );
259
- return ui.checkBoxFollowBoundaries ->isEnabled ();
257
+ const bool enabled = nPolygon > 0 ;
258
+ if ( !enabled )
259
+ ui.checkBoxFollowBoundaries ->setChecked ( false );
260
+ ui.checkBoxFollowBoundaries ->setEnabled ( enabled );
261
+ ui.comboBoxFollowBoundaries ->setEnabled ( enabled && ui.checkBoxFollowBoundaries ->isChecked () );
262
+ return enabled;
260
263
}
261
264
262
265
template <> QgsGeometryCheck *QgsGeometryCheckFactoryT<QgsGeometryFollowBoundariesCheck>::createInstance( QgsGeometryCheckerContext *context, const Ui::QgsGeometryCheckerSetupTab &ui ) const
@@ -371,9 +374,12 @@ template<> void QgsGeometryCheckFactoryT<QgsGeometryLineLayerIntersectionCheck>:
371
374
372
375
template <> bool QgsGeometryCheckFactoryT<QgsGeometryLineLayerIntersectionCheck>::checkApplicability( Ui::QgsGeometryCheckerSetupTab &ui, int /* nPoint*/ , int nLineString, int /* nPolygon*/ ) const
373
376
{
374
- ui.checkLineLayerIntersection ->setEnabled ( nLineString > 0 );
375
- ui.comboLineLayerIntersection ->setEnabled ( nLineString > 0 );
376
- return ui.checkLineLayerIntersection ->isEnabled ();
377
+ const bool enabled = nLineString > 0 ;
378
+ if ( !enabled )
379
+ ui.checkLineLayerIntersection ->setChecked ( false );
380
+ ui.checkLineLayerIntersection ->setEnabled ( enabled );
381
+ ui.comboLineLayerIntersection ->setEnabled ( enabled && ui.checkLineLayerIntersection ->isChecked () );
382
+ return enabled;
377
383
}
378
384
379
385
template <> QgsGeometryCheck *QgsGeometryCheckFactoryT<QgsGeometryLineLayerIntersectionCheck>::createInstance( QgsGeometryCheckerContext *context, const Ui::QgsGeometryCheckerSetupTab &ui ) const
0 commit comments