Skip to content
Permalink
Browse files

[processing][needs-docs] allow to switch from batch dialog to single UI

(fix #16893)
  • Loading branch information
alexbruy authored and nyalldawson committed May 23, 2019
1 parent ddea00e commit e8a74f453790d6bffdcf0bfb11b0009f54af569e
Showing with 13 additions and 1 deletion.
  1. +13 −1 python/plugins/processing/gui/BatchAlgorithmDialog.py
@@ -24,7 +24,7 @@
from pprint import pformat
import time

from qgis.PyQt.QtWidgets import QMessageBox
from qgis.PyQt.QtWidgets import QMessageBox, QPushButton, QDialogButtonBox
from qgis.PyQt.QtCore import Qt, QCoreApplication

from qgis.core import (QgsProcessingParameterDefinition,
@@ -66,6 +66,18 @@ def __init__(self, alg, parent=None):
self.setMainWidget(BatchPanel(self, self.algorithm()))
self.hideShortHelp()

self.btnRunSingle = QPushButton(self.tr("Run as Single Process…"))
self.btnRunSingle.clicked.connect(self.runAsSingle)
self.buttonBox().addButton(self.btnRunSingle, QDialogButtonBox.ResetRole) # reset role to ensure left alignment

def runAsSingle(self):
self.close()

from processing.gui.AlgorithmDialog import AlgorithmDialog
dlg = AlgorithmDialog(self.algorithm().create(), parent=iface.mainWindow())
dlg.show()
dlg.exec_()

def runAlgorithm(self):
alg_parameters = []

0 comments on commit e8a74f4

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