Skip to content

Commit 6cc27c7

Browse files
author
volayaf
committedJun 28, 2012
added threading to execution from console
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@268 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent 0573907 commit 6cc27c7

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
 

‎src/sextante/core/Sextante.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,18 @@ def runalg(name, *args):
287287
SextanteLog.addToLog(SextanteLog.LOG_ALGORITHM, alg.getAsCommand())
288288

289289
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
290-
alg.execute()
291-
QApplication.restoreOverrideCursor()
290+
algEx = AlgorithmExecutor(alg)
291+
def finish():
292+
#SextantePostprocessing.handleAlgorithmResults(alg)
293+
QApplication.restoreOverrideCursor()
294+
def error(msg):
295+
QApplication.restoreOverrideCursor()
296+
print msg
297+
SextanteLog.addToLog(SextanteLog.LOG_ERROR, msg)
298+
algEx.error.connect(error)
299+
algEx.finished.connect(finish)
300+
algEx.start()
301+
algEx.wait()
292302
return alg.getOutputValuesAsDictionary()
293303

294304

0 commit comments

Comments
 (0)
Please sign in to comment.