Skip to content

Commit d4a316a

Browse files
author
cpolymeris@gmail.com
committed
Fix bug in algo execution dialog that prevented loading results.
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@333 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent e46b466 commit d4a316a

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/sextante/gui/AlgorithmExecutionDialog.py

+3-18
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def setParamValue(self, param, widget):
166166

167167
@pyqtSlot()
168168
def accept(self):
169-
#~ try:
170169
if self.setParamValues():
171170
msg = self.alg.checkParameterValuesBeforeExecuting()
172171
if msg:
@@ -205,39 +204,25 @@ def accept(self):
205204
self.setInfo("Algorithm %s started" % self.alg.name)
206205
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(True)
207206
self.tabWidget.setCurrentIndex(1) # log tab
208-
self.finish()
209207
else:
210-
keepOpen = SextanteConfig.getSetting(SextanteConfig.KEEP_DIALOG_OPEN)
211208
if iterateParam:
212209
UnthreadedAlgorithmExecutor.runalgIterating(self.alg, iterateParam, self)
213210
else:
214211
command = self.alg.getAsCommand()
215212
if command:
216213
SextanteLog.addToLog(SextanteLog.LOG_ALGORITHM, command)
217214
if UnthreadedAlgorithmExecutor.runalg(self.alg, self):
218-
SextantePostprocessing.handleAlgorithmResults(self.alg, not keepOpen)
219-
self.executed = True
220-
QApplication.restoreOverrideCursor()
221-
if not keepOpen:
222-
self.close()
223-
else:
224-
self.progressLabel.setText("")
225-
self.progress.setMaximum(100)
226-
self.progress.setValue(0)
227-
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
228-
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
229-
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
230-
231-
215+
self.finish()
232216
else:
233217
QMessageBox.critical(self, "Unable to execute algorithm", "Wrong or missing parameter values")
234218

235219
@pyqtSlot()
236220
def finish(self):
221+
keepOpen = SextanteConfig.getSetting(SextanteConfig.KEEP_DIALOG_OPEN)
222+
SextantePostprocessing.handleAlgorithmResults(self.alg, not keepOpen)
237223
self.executed = True
238224
self.setInfo("Algorithm %s finished correctly" % self.alg.name)
239225
QApplication.restoreOverrideCursor()
240-
keepOpen = SextanteConfig.getSetting(SextanteConfig.KEEP_DIALOG_OPEN)
241226
if not keepOpen:
242227
self.close()
243228
else:

0 commit comments

Comments
 (0)