diff --git a/python/plugins/processing/gui/BatchAlgorithmDialog.py b/python/plugins/processing/gui/BatchAlgorithmDialog.py index 45e84245ab4e..81d9cc862e24 100644 --- a/python/plugins/processing/gui/BatchAlgorithmDialog.py +++ b/python/plugins/processing/gui/BatchAlgorithmDialog.py @@ -89,7 +89,7 @@ def runAlgorithm(self): if not param.checkValueIsAcceptable(wrapper.parameterValue()): self.messageBar().pushMessage("", self.tr('Wrong or missing parameter value: {0} (row {1})').format( param.description(), row + 1), - level=Qgis.Warning, duration=5) + level=Qgis.Warning, duration=5) return col += 1 count_visible_outputs = 0 @@ -112,7 +112,7 @@ def runAlgorithm(self): else: self.messageBar().pushMessage("", self.tr('Wrong or missing output value: {0} (row {1})').format( out.description(), row + 1), - level=Qgis.Warning, duration=5) + level=Qgis.Warning, duration=5) return alg_parameters.append(parameters) @@ -139,8 +139,11 @@ def runAlgorithm(self): for count, parameters in enumerate(alg_parameters): if feedback.isCanceled(): break - self.setProgressText(QCoreApplication.translate('BatchAlgorithmDialog', '\nProcessing algorithm {0}/{1}…').format(count + 1, len(alg_parameters))) - self.setInfo(self.tr('Algorithm {0} starting…').format(self.algorithm().displayName()), escapeHtml=False) + self.setProgressText( + QCoreApplication.translate('BatchAlgorithmDialog', '\nProcessing algorithm {0}/{1}…').format( + count + 1, len(alg_parameters))) + self.setInfo(self.tr('Algorithm {0} starting…').format(self.algorithm().displayName()), + escapeHtml=False) multi_feedback.setCurrentStep(count) parameters = self.algorithm().preprocessParameters(parameters) @@ -158,7 +161,9 @@ def runAlgorithm(self): alg_start_time = time.time() ret, results = execute(self.algorithm(), parameters, context, multi_feedback) if ret: - self.setInfo(QCoreApplication.translate('BatchAlgorithmDialog', 'Algorithm {0} correctly executed…').format(self.algorithm().displayName()), escapeHtml=False) + self.setInfo( + QCoreApplication.translate('BatchAlgorithmDialog', 'Algorithm {0} correctly executed…').format( + self.algorithm().displayName()), escapeHtml=False) feedback.pushInfo( self.tr('Execution completed in {0:0.2f} seconds'.format(time.time() - alg_start_time))) feedback.pushInfo(self.tr('Results:')) @@ -209,5 +214,6 @@ def createSummaryTable(self, algorithm_results): f.write('

{}: {}

\n'.format(out.description(), res[out.name()])) f.write('
\n') - resultsList.addResult(self.algorithm().icon(), - '{} [summary]'.format(self.algorithm().name()), outputFile) + resultsList.addResult(icon=self.algorithm().icon(), + name='{} [summary]'.format(self.algorithm().name()), timestamp=time.localtime(), + result=outputFile)