Skip to content
Browse files

[processing] fixes for SAGA folder configuration

This tries to address some problem with previously set SAGA paths, by always showing the SAGA path config value, and by trying to ruin a built in copy of SAGA if the current SAGA folder is wrong (as it usually happens when updating QGIS)
  • Loading branch information
volaya committed Dec 12, 2016
1 parent c17837c commit 93feb8bc32494772ff44bb714e362f83c8161c1d
@@ -57,7 +57,7 @@ def __init__(self):
self.activate = True

def initializeSettings(self):
if (isWindows() or isMac()) and SagaUtils.findSagaFolder() is None:
if (isWindows() or isMac()):
SagaUtils.SAGA_FOLDER,'SAGA folder'),
@@ -77,7 +77,7 @@ def initializeSettings(self):

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

@@ -72,10 +72,13 @@ def findSagaFolder():

def sagaPath():
folder = ProcessingConfig.getSetting(SAGA_FOLDER)
if not os.path.isdir(folder):
folder = None
'Specified SAGA folder does not exist. Will try to find built-in binaries.')
if folder is None or folder == '':
folder = findSagaFolder()
if folder is not None:
ProcessingConfig.setSettingValue(SAGA_FOLDER, folder)

return folder or ''

0 comments on commit 93feb8b

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