Skip to content
Permalink
Browse files

[processing] fixes for issues with 3rd party providers being loaded a…

…nd unloaded
  • Loading branch information
volaya committed Jun 1, 2016
1 parent b0a9a84 commit 61e26fd8f3650fe03e26926b6be0c6cee64ccb54
Showing with 9 additions and 5 deletions.
  1. +7 −4 python/plugins/processing/core/Processing.py
  2. +2 −1 python/plugins/processing/core/alglist.py
@@ -112,9 +112,12 @@ def removeProvider(provider):
"""
try:
provider.unload()
Processing.providers.remove(provider)
algList.remove(provider.getName())
del Processing.actions[provider.getName()]
for p in Processing.providers:
if p.getName() == provider.getName():
Processing.providers.remove(p)
algList.removeProvider(provider.getName())
if provider.getName() in Processing.actions:
del Processing.actions[provider.getName()]
for act in provider.contextMenuActions:
Processing.contextMenuActions.remove(act)
except:
@@ -131,7 +134,7 @@ def getProviderFromName(name):

@staticmethod
def initialize():
if Processing.providers:
if "model" in [p.getName() for p in Processing.providers]:
return
# Add the basic providers
for c in AlgorithmProvider.__subclasses__():
@@ -45,7 +45,8 @@ def removeProvider(self, providerName):
if p.getName() == providerName:
self.providers.remove(p)
break
self.algs.remove(providerName)
if providerName in self.algs:
del self.algs[providerName]
self.providerRemoved.emit(providerName)

def reloadProvider(self, providerName):

0 comments on commit 61e26fd

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