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
This commit is contained in:
volayaf 2012-06-28 19:28:23 +00:00
parent 0573907d21
commit 6cc27c7e23

View File

@ -287,8 +287,18 @@ class Sextante:
SextanteLog.addToLog(SextanteLog.LOG_ALGORITHM, alg.getAsCommand())
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
alg.execute()
QApplication.restoreOverrideCursor()
algEx = AlgorithmExecutor(alg)
def finish():
#SextantePostprocessing.handleAlgorithmResults(alg)
QApplication.restoreOverrideCursor()
def error(msg):
QApplication.restoreOverrideCursor()
print msg
SextanteLog.addToLog(SextanteLog.LOG_ERROR, msg)
algEx.error.connect(error)
algEx.finished.connect(finish)
algEx.start()
algEx.wait()
return alg.getOutputValuesAsDictionary()