Skip to content

Commit 916805c

Browse files
committedFeb 12, 2019
[processing] More responsive cancelation for dissolve algorithm
1 parent d614ff3 commit 916805c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/analysis/processing/qgsalgorithmdissolve.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,16 @@ QVariantMap QgsDissolveAlgorithm::processAlgorithm( const QVariantMap &parameter
219219
// See: https://issues.qgis.org/issues/20591 - Dissolve tool failing to produce outputs
220220
if ( ! result.lastError().isEmpty() && parts.count() > 2 )
221221
{
222+
if ( feedback->isCanceled() )
223+
return result;
224+
222225
feedback->pushDebugInfo( QObject::tr( "GEOS exception: taking the slower route ..." ) );
223226
result = QgsGeometry();
224227
for ( const auto &p : parts )
225228
{
226229
result = QgsGeometry::unaryUnion( QVector< QgsGeometry >() << result << p );
230+
if ( feedback->isCanceled() )
231+
return result;
227232
}
228233
}
229234
if ( ! result.lastError().isEmpty() )

0 commit comments

Comments
 (0)
Please sign in to comment.