Skip to content
Permalink
Browse files

Cancelation terminates thread.

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@248 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
cpolymeris@gmail.com
cpolymeris@gmail.com committed Jun 16, 2012
1 parent a5c7b56 commit 1c4a756451abc6d7a6921ade70dba6bde4a23f1f
@@ -277,8 +277,7 @@ def runalg(name, *args):
SextanteLog.addToLog(SextanteLog.LOG_ALGORITHM, alg.getAsCommand())

QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
algEx = AlgorithmExecutor(alg)
algEx.start()
alg.execute()
QApplication.restoreOverrideCursor()
return alg.getOutputValuesAsDictionary()

@@ -114,6 +114,8 @@ def loadHTMLResults(self, alg, i):

def cancelPressed(self):
self.algs = None
if self.algEx:
self.algEx.terminate()
self.close()

@pyqtSlot()
@@ -227,6 +227,7 @@ def error(self, msg):
def cancel(self):
try:
self.algEx.finished.disconnect()
self.algEx.terminate()
QApplication.restoreOverrideCursor()
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
except:

0 comments on commit 1c4a756

Please sign in to comment.
You can’t perform that action at this time.