Skip to content
Permalink
Browse files

[processing] hide SAGA folder option if built-in SAGA is available

  • Loading branch information
volaya committed Nov 6, 2015
1 parent edb3cf3 commit 54bdcefc11d0a42b224cc58a3c806e1157d95ef2
Showing with 5 additions and 3 deletions.
  1. +5 −3 python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
@@ -37,6 +37,7 @@
import SagaUtils
from processing.tools.system import isWindows, isMac


pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))

@@ -55,9 +56,10 @@ def __init__(self):
self.activate = True

def initializeSettings(self):
if isWindows() or isMac():
if (isWindows() or isMac()) and SagaUtils.findSagaFolder() is None:
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_FOLDER, self.tr('SAGA folder'), '',
SagaUtils.SAGA_FOLDER, self.tr('SAGA folder'),
'',
valuetype=Setting.FOLDER))
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION,
@@ -74,7 +76,7 @@ def initializeSettings(self):

def unload(self):
AlgorithmProvider.unload(self)
if isWindows() or isMac():
if (isWindows() or isMac()) and SagaUtils.findSagaFolder() is None:
ProcessingConfig.removeSetting(SagaUtils.SAGA_FOLDER)

ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)

0 comments on commit 54bdcef

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