Skip to content

Commit

Permalink
Don't set override cursor in processing.run
Browse files Browse the repository at this point in the history
Callers may not want this, so leave it up to them to set
an override caller if desired
  • Loading branch information
nyalldawson committed Jun 27, 2017
1 parent 3286ebb commit 4e93f8d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions python/plugins/processing/core/Processing.py
Expand Up @@ -166,18 +166,6 @@ def runAlgorithm(algOrName, parameters, onFinish, feedback=None, context=None):
Processing.tr('Warning: Not all input layers use the same CRS.\nThis can cause unexpected results.'),
Processing.tr("Processing"))

# Don't set the wait cursor twice, because then when you
# restore it, it will still be a wait cursor.
overrideCursor = False
if iface is not None:
cursor = QApplication.overrideCursor()
if cursor is None or cursor == 0:
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
overrideCursor = True
elif cursor.shape() != Qt.WaitCursor:
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
overrideCursor = True

ret, results = execute(alg, parameters, context, feedback)
if ret:
if onFinish is not None:
Expand All @@ -186,8 +174,6 @@ def runAlgorithm(algOrName, parameters, onFinish, feedback=None, context=None):
QgsMessageLog.logMessage(Processing.tr("There were errors executing the algorithm."),
Processing.tr("Processing"))

if overrideCursor:
QApplication.restoreOverrideCursor()
if isinstance(feedback, MessageBarProgress):
feedback.close()
return results
Expand Down

0 comments on commit 4e93f8d

Please sign in to comment.