Skip to content

Commit 05933ef

Browse files
committed
[processing] More responsive cancelation for dissolve algorithm
(cherry picked from commit 916805c)
1 parent 7830cc7 commit 05933ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/analysis/processing/qgsalgorithmdissolve.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,16 @@ QVariantMap QgsDissolveAlgorithm::processAlgorithm( const QVariantMap &parameter
220220
// See: https://issues.qgis.org/issues/20591 - Dissolve tool failing to produce outputs
221221
if ( ! result.lastError().isEmpty() && parts.count() > 2 )
222222
{
223+
if ( feedback->isCanceled() )
224+
return result;
225+
223226
feedback->pushDebugInfo( QStringLiteral( "GEOS exception: taking the slower route ..." ) );
224227
result = QgsGeometry();
225228
for ( const auto &p : parts )
226229
{
227230
result = QgsGeometry::unaryUnion( QVector< QgsGeometry >() << result << p );
231+
if ( feedback->isCanceled() )
232+
return result;
228233
}
229234
}
230235
if ( ! result.lastError().isEmpty() )

0 commit comments

Comments
 (0)