Skip to content

Commit

Permalink
provider enabled/disabled via Plugin Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jun 21, 2021
1 parent cbe1a47 commit d7faf9c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions python/plugins/grassprovider/Grass7AlgorithmProvider.py
Expand Up @@ -38,7 +38,6 @@

class Grass7AlgorithmProvider(QgsProcessingProvider):
descriptionFolder = Grass7Utils.grassDescriptionPath()
activateSetting = "ACTIVATE_GRASS7"

def __init__(self):
super().__init__()
Expand All @@ -47,9 +46,6 @@ def __init__(self):
def load(self):
with QgsRuntimeProfiler.profile('Grass Provider'):
ProcessingConfig.settingIcons[self.name()] = self.icon()
if self.activateSetting:
ProcessingConfig.addSetting(Setting(self.name(), self.activateSetting,
self.tr('Activate'), True))
ProcessingConfig.addSetting(Setting(
self.name(),
Grass7Utils.GRASS_LOG_COMMANDS,
Expand Down Expand Up @@ -84,23 +80,12 @@ def load(self):
return True

def unload(self):
if self.activateSetting:
ProcessingConfig.removeSetting(self.activateSetting)
ProcessingConfig.removeSetting(Grass7Utils.GRASS_LOG_COMMANDS)
ProcessingConfig.removeSetting(Grass7Utils.GRASS_LOG_CONSOLE)
ProcessingConfig.removeSetting(Grass7Utils.GRASS_HELP_PATH)
ProcessingConfig.removeSetting(Grass7Utils.GRASS_USE_REXTERNAL)
ProcessingConfig.removeSetting(Grass7Utils.GRASS_USE_VEXTERNAL)

def isActive(self):
if self.activateSetting:
return ProcessingConfig.getSetting(self.activateSetting)
return True

def setActive(self, active):
if self.activateSetting:
ProcessingConfig.setSettingValue(self.activateSetting, active)

def createAlgsList(self):
algs = []
folder = self.descriptionFolder
Expand Down

0 comments on commit d7faf9c

Please sign in to comment.