Skip to content

Commit

Permalink
Simpler approach
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Sep 20, 2024
1 parent 91ac3e2 commit 3df5c79
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/analysis/processing/qgsalgorithmrandompointsinpolygons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,7 @@ QVariantMap QgsRandomPointsInPolygonsAlgorithm::processAlgorithm( const QVariant
int numberPointsForThisFeature = mNumPoints;
if ( mDynamicNumPoints )
{
bool ok;
const int numPointsFromProperty { mNumPointsProperty.valueAsInt( expressionContext, numberPointsForThisFeature, &ok ) };
if ( ok )
{
numberPointsForThisFeature = numPointsFromProperty;
}
else
{
numberPointsForThisFeature = 0;
}
numberPointsForThisFeature = mNumPointsProperty.valueAsInt( expressionContext, 0 );
}
desiredNumberOfPoints += numberPointsForThisFeature;
int maxAttemptsForThisFeature = mMaxAttempts;
Expand Down

0 comments on commit 3df5c79

Please sign in to comment.