Skip to content
Permalink
Browse files

fixed minor issue when executing algorithms from the toolbox

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@274 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf
volayaf committed Jun 29, 2012
1 parent f4b0df4 commit 980ad225099576a5e49cf45328d9038a0a93d1cc
Showing with 17 additions and 3 deletions.
  1. +17 −3 src/sextante/gui/ParametersDialog.py
@@ -193,12 +193,26 @@ def accept(self):
self.algEx.textChanged.connect(self.setText)
self.algEx.start()
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(True)
self.finish()
else:
keepOpen = SextanteConfig.getSetting(SextanteConfig.KEEP_DIALOG_OPEN)
if iterateParam:
UnthreadedAlgorithmExecutor.runalgIterating(self.alg, iterateParam, self)
else:
UnthreadedAlgorithmExecutor.runalg(self.alg, self)
self.finish()
if UnthreadedAlgorithmExecutor.runalg(self.alg, self):
SextantePostprocessing.handleAlgorithmResults(self.alg, not keepOpen)
self.dialog.executed = True
QApplication.restoreOverrideCursor()
if not keepOpen:
self.dialog.close()
else:
self.progressLabel.setText("")
self.progress.setMaximum(100)
self.progress.setValue(0)
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)


else:
QMessageBox.critical(self.dialog, "Unable to execute algorithm", "Wrong or missing parameter values")
@@ -217,7 +231,7 @@ def finish(self):
self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Close).setEnabled(True)
self.buttonBox.button(QtGui.QDialogButtonBox.Cancel).setEnabled(False)
SextantePostprocessing.handleAlgorithmResults(self.alg, not keepOpen)


@pyqtSlot()
def error(self, msg):

0 comments on commit 980ad22

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