Skip to content

Commit

Permalink
Use area parameter for Remove Holes algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 10, 2024
1 parent 7926d8f commit 4ac3a34
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/analysis/processing/qgsalgorithmremoveholes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ Qgis::ProcessingFeatureSourceFlags QgsRemoveHolesAlgorithm::sourceFlags() const

void QgsRemoveHolesAlgorithm::initParameters( const QVariantMap & )
{
std::unique_ptr< QgsProcessingParameterNumber > minArea = std::make_unique< QgsProcessingParameterNumber >( QStringLiteral( "MIN_AREA" ),
QObject::tr( "Remove holes with area less than" ), Qgis::ProcessingNumberParameterType::Double,
0.0, false, 0 );
std::unique_ptr< QgsProcessingParameterArea > minArea = std::make_unique< QgsProcessingParameterArea >( QStringLiteral( "MIN_AREA" ),
QObject::tr( "Remove holes with area less than" ),
0.0,
QStringLiteral( "INPUT" ),
false, 0 );
minArea->setIsDynamic( true );
minArea->setDynamicPropertyDefinition( QgsPropertyDefinition( QStringLiteral( "MIN_AREA" ), QObject::tr( "Remove holes with area less than" ), QgsPropertyDefinition::DoublePositive ) );
minArea->setDynamicLayerParameterName( QStringLiteral( "INPUT" ) );
Expand Down

0 comments on commit 4ac3a34

Please sign in to comment.