Skip to content

Commit

Permalink
[processing][needs-docs] always use SAGA shipped with QGIS (refs #16422)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed May 19, 2017
1 parent d7b952b commit b9929d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
8 changes: 0 additions & 8 deletions python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
Expand Up @@ -53,11 +53,6 @@ def load(self):
ProcessingConfig.settingIcons[self.name()] = self.icon()
ProcessingConfig.addSetting(Setting("SAGA", 'ACTIVATE_SAGA',
self.tr('Activate'), True))
if (isWindows() or isMac()):
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_FOLDER, self.tr('SAGA folder'),
'',
valuetype=Setting.FOLDER))
ProcessingConfig.addSetting(Setting("SAGA",
SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION,
self.tr('Enable SAGA Import/Export optimizations'), False))
Expand All @@ -73,9 +68,6 @@ def load(self):

def unload(self):
ProcessingConfig.removeSetting('ACTIVATE_SAGA')
if (isWindows() or isMac()):
ProcessingConfig.removeSetting(SagaUtils.SAGA_FOLDER)

ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)

Expand Down
10 changes: 3 additions & 7 deletions python/plugins/processing/algs/saga/SagaUtils.py
Expand Up @@ -39,7 +39,6 @@

SAGA_LOG_COMMANDS = 'SAGA_LOG_COMMANDS'
SAGA_LOG_CONSOLE = 'SAGA_LOG_CONSOLE'
SAGA_FOLDER = 'SAGA_FOLDER'
SAGA_IMPORT_EXPORT_OPTIMIZATION = 'SAGA_IMPORT_EXPORT_OPTIMIZATION'

_installedVersion = None
Expand Down Expand Up @@ -83,13 +82,10 @@ def findSagaFolder():


def sagaPath():
folder = ProcessingConfig.getSetting(SAGA_FOLDER)
if folder and not os.path.isdir(folder):
folder = None
QgsMessageLog.logMessage('Specified SAGA folder does not exist. Will try to find built-in binaries.', 'Processing', QgsMessageLog.WARNING)
if folder is None or folder == '':
folder = findSagaFolder()
if not isWindows() and not isMac():
return ''

folder = findSagaFolder()
return folder or ''


Expand Down

0 comments on commit b9929d4

Please sign in to comment.