Skip to content

Commit 4e93f8d

Browse files
committed
Don't set override cursor in processing.run
Callers may not want this, so leave it up to them to set an override caller if desired
1 parent 3286ebb commit 4e93f8d

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

python/plugins/processing/core/Processing.py

-14
Original file line numberDiff line numberDiff line change
@@ -166,18 +166,6 @@ def runAlgorithm(algOrName, parameters, onFinish, feedback=None, context=None):
166166
Processing.tr('Warning: Not all input layers use the same CRS.\nThis can cause unexpected results.'),
167167
Processing.tr("Processing"))
168168

169-
# Don't set the wait cursor twice, because then when you
170-
# restore it, it will still be a wait cursor.
171-
overrideCursor = False
172-
if iface is not None:
173-
cursor = QApplication.overrideCursor()
174-
if cursor is None or cursor == 0:
175-
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
176-
overrideCursor = True
177-
elif cursor.shape() != Qt.WaitCursor:
178-
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
179-
overrideCursor = True
180-
181169
ret, results = execute(alg, parameters, context, feedback)
182170
if ret:
183171
if onFinish is not None:
@@ -186,8 +174,6 @@ def runAlgorithm(algOrName, parameters, onFinish, feedback=None, context=None):
186174
QgsMessageLog.logMessage(Processing.tr("There were errors executing the algorithm."),
187175
Processing.tr("Processing"))
188176

189-
if overrideCursor:
190-
QApplication.restoreOverrideCursor()
191177
if isinstance(feedback, MessageBarProgress):
192178
feedback.close()
193179
return results

0 commit comments

Comments
 (0)