Skip to content

Commit

Permalink
provider enabled/disabled by activating/deactivating plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Jun 21, 2021
1 parent 86d4d8c commit 4248cf9
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions python/plugins/sagaprovider/SagaAlgorithmProvider.py
Expand Up @@ -53,8 +53,6 @@ def __init__(self):
def load(self):
with QgsRuntimeProfiler.profile('SAGA Provider'):
ProcessingConfig.settingIcons[self.name()] = self.icon()
ProcessingConfig.addSetting(Setting("SAGA", 'ACTIVATE_SAGA',
self.tr('Activate'), True))
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION,
self.tr('Enable SAGA Import/Export optimizations'), False))
Expand All @@ -70,17 +68,10 @@ def load(self):
return True

def unload(self):
ProcessingConfig.removeSetting('ACTIVATE_SAGA')
ProcessingConfig.removeSetting(SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION)
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)

def isActive(self):
return ProcessingConfig.getSetting('ACTIVATE_SAGA')

def setActive(self, active):
ProcessingConfig.setSettingValue('ACTIVATE_SAGA', active)

def canBeActivated(self):
version = SagaUtils.getInstalledVersion(True)
return bool(
Expand Down

0 comments on commit 4248cf9

Please sign in to comment.