Skip to content
Permalink
Browse files

[processing] More responsive cancelation for dissolve algorithm

(cherry picked from commit 916805c)
  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent 7830cc7 commit 05933ef02fd9ecdbf4e0bc2d4675eb25d12bbcf0
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/analysis/processing/qgsalgorithmdissolve.cpp
@@ -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() )

0 comments on commit 05933ef

Please sign in to comment.
You can’t perform that action at this time.