Skip to content

Commit

Permalink
Refresh model algorithms when providers are added
Browse files Browse the repository at this point in the history
Since algorithms which models are dependent upon may now be
available, we need to rebuild them to ensure that they
will operate correctly.
  • Loading branch information
nyalldawson committed Jun 24, 2017
1 parent ab9470d commit 5822ef9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/plugins/processing/modeler/ModelerAlgorithmProvider.py
Expand Up @@ -58,6 +58,10 @@ def __init__(self):
self.contextMenuActions = [EditModelAction(), DeleteModelAction()]
self.algs = []

# must reload models if providers list is changed - previously unavailable algorithms
# which models depend on may now be available
QgsApplication.processingRegistry().providerAdded.connect(self.refreshAlgorithms)

def load(self):
ProcessingConfig.settingIcons[self.name()] = self.icon()
ProcessingConfig.addSetting(Setting(self.name(),
Expand Down

0 comments on commit 5822ef9

Please sign in to comment.