Skip to content

Commit 1c4a756

Browse files
author
cpolymeris@gmail.com
committedJun 16, 2012
Cancelation terminates thread.
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@248 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent a5c7b56 commit 1c4a756

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
 

‎src/sextante/core/Sextante.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ def runalg(name, *args):
277277
SextanteLog.addToLog(SextanteLog.LOG_ALGORITHM, alg.getAsCommand())
278278

279279
QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
280-
algEx = AlgorithmExecutor(alg)
281-
algEx.start()
280+
alg.execute()
282281
QApplication.restoreOverrideCursor()
283282
return alg.getOutputValuesAsDictionary()
284283

‎src/sextante/gui/BatchProcessingDialog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ def loadHTMLResults(self, alg, i):
114114

115115
def cancelPressed(self):
116116
self.algs = None
117+
if self.algEx:
118+
self.algEx.terminate()
117119
self.close()
118120

119121
@pyqtSlot()

‎src/sextante/gui/ParametersDialog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ def error(self, msg):
227227
def cancel(self):
228228
try:
229229
self.algEx.finished.disconnect()
230+
self.algEx.terminate()
230231
QApplication.restoreOverrideCursor()
231232
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
232233
except:

0 commit comments

Comments
 (0)
Please sign in to comment.