Skip to content

Commit

Permalink
Rename execute function
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso authored and nyalldawson committed Nov 30, 2021
1 parent fe61a98 commit e5d53ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/plugins/processing/ProcessingPlugin.py
Expand Up @@ -203,7 +203,7 @@ def initGui(self):
self.toolbox.hide()
self.toolbox.visibilityChanged.connect(self.toolboxVisibilityChanged)

self.toolbox.executeWithGui.connect(self.executeProjectModel)
self.toolbox.executeWithGui.connect(self.executeAlgorithm)

self.resultsDock = ResultsDock()
self.iface.addDockWidget(Qt.RightDockWidgetArea, self.resultsDock)
Expand Down Expand Up @@ -315,15 +315,15 @@ def updateProjectModelMenu(self):
modelSubMenu = self.projectModelsMenu.addMenu(model.name())
modelSubMenu.setParent(self.projectModelsMenu)
action = QAction(self.tr("Execute…"), modelSubMenu)
action.triggered.connect(partial(self.executeProjectModel, model.id(), self.projectModelsMenu, self.toolbox.in_place_mode))
action.triggered.connect(partial(self.executeAlgorithm, model.id(), self.projectModelsMenu, self.toolbox.in_place_mode))
modelSubMenu.addAction(action)
if model.flags() & QgsProcessingAlgorithm.FlagSupportsBatch:
action = QAction(self.tr("Execute as Batch Process…"), modelSubMenu)
modelSubMenu.addAction(action)
action.triggered.connect(partial(self.executeProjectModel, model.id(), self.projectModelsMenu, self.toolbox.in_place_mode, True))
action.triggered.connect(partial(self.executeAlgorithm, model.id(), self.projectModelsMenu, self.toolbox.in_place_mode, True))

@pyqtSlot(str, QWidget, bool, bool)
def executeProjectModel(self, alg_id, parent, in_place=False, as_batch=False):
def executeAlgorithm(self, alg_id, parent, in_place=False, as_batch=False):
"""Executes a project model with GUI interaction if needed.
:param alg_id: algorithm id
Expand Down

0 comments on commit e5d53ad

Please sign in to comment.