Skip to content
Permalink
Browse files

Merge pull request #6408 from arnaud-morvan/processing_reload_fix

Processing reload fixes
  • Loading branch information
nyalldawson committed Feb 21, 2018
2 parents 1eea857 + 5af792c commit 0481666b77e15d2f7c2f4249a399cd627efd2026
@@ -253,6 +253,7 @@ def unload(self):
self.resultsDock.setVisible(False)
self.iface.removeDockWidget(self.resultsDock)

self.toolbox.deleteLater()
self.menu.deleteLater()

# delete temporary output files
@@ -85,11 +85,15 @@ def initialize():
if "model" in [p.id() for p in QgsApplication.processingRegistry().providers()]:
return
# Add the basic providers
for c in QgsProcessingProvider.__subclasses__():
for c in [
QgisAlgorithmProvider,
Grass7AlgorithmProvider,
GdalAlgorithmProvider,
SagaAlgorithmProvider,
ScriptAlgorithmProvider,
ModelerAlgorithmProvider
]:
p = c()
if p.id() in ('native', '3d'):
# c++ providers are already registered
continue
if QgsApplication.processingRegistry().addProvider(p):
Processing.BASIC_PROVIDERS.append(p)
# And initialize
@@ -63,7 +63,10 @@ def __init__(self):

# 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)
QgsApplication.processingRegistry().providerAdded.connect(self.onProviderAdded)

def onProviderAdded(self, provider_id):
self.refreshAlgorithms()

def load(self):
ProcessingConfig.settingIcons[self.name()] = self.icon()

0 comments on commit 0481666

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