Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] More responsive cancelation for dissolve algorithm
(cherry picked from commit 916805c)
  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 7830cc7 commit 05933ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/analysis/processing/qgsalgorithmdissolve.cpp
Expand Up @@ -220,11 +220,16 @@ QVariantMap QgsDissolveAlgorithm::processAlgorithm( const QVariantMap &parameter
// See: https://issues.qgis.org/issues/20591 - Dissolve tool failing to produce outputs
if ( ! result.lastError().isEmpty() && parts.count() > 2 )
{
if ( feedback->isCanceled() )
return result;

feedback->pushDebugInfo( QStringLiteral( "GEOS exception: taking the slower route ..." ) );
result = QgsGeometry();
for ( const auto &p : parts )
{
result = QgsGeometry::unaryUnion( QVector< QgsGeometry >() << result << p );
if ( feedback->isCanceled() )
return result;
}
}
if ( ! result.lastError().isEmpty() )
Expand Down

0 comments on commit 05933ef

Please sign in to comment.