Skip to content
Permalink
Browse files

[processing] More responsive cancelation for dissolve algorithm

  • Loading branch information
nyalldawson committed Feb 12, 2019
1 parent d614ff3 commit 916805cf0479e7e972e28fef9c3632aafe80b06c
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/analysis/processing/qgsalgorithmdissolve.cpp
@@ -219,11 +219,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( QObject::tr( "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 916805c

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