mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
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:
parent
0573907d21
commit
6cc27c7e23
@ -287,8 +287,18 @@ class Sextante:
|
||||
SextanteLog.addToLog(SextanteLog.LOG_ALGORITHM, alg.getAsCommand())
|
||||
|
||||
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
|
||||
alg.execute()
|
||||
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()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user