Skip to content

Commit

Permalink
[processing] added activateProvider method in Processing class
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Jun 2, 2016
1 parent 1b905c8 commit 99c16f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/plugins/processing/core/Processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ def getProviderFromName(name):
"""Returns the provider with the given name."""
return algList.getProviderFromName(name)

@staticmethod
def activateProvider(providerOrName, activate=True):
providerName = providerOrName.getName() if isinstance(providerOrName, AlgorithmProvider) else providerOrName
name = 'ACTIVATE_' + providerName.upper().replace(' ', '_')
ProcessingConfig.setSettingValue(name, activate)
algList.providerUpdated.emit(providerName)

@staticmethod
def initialize():
if "model" in [p.getName() for p in Processing.providers]:
Expand Down

0 comments on commit 99c16f0

Please sign in to comment.