Skip to content

Commit bbcc872

Browse files
authoredMay 19, 2017
Merge pull request #4587 from alexbruy/processing-saga
[processing][needs-docs] always use SAGA shipped with QGIS (refs #16422)
2 parents 0a82ab5 + b9929d4 commit bbcc872

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed
 

‎python/plugins/processing/algs/saga/SagaAlgorithmProvider.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ def load(self):
5353
ProcessingConfig.settingIcons[self.name()] = self.icon()
5454
ProcessingConfig.addSetting(Setting("SAGA", 'ACTIVATE_SAGA',
5555
self.tr('Activate'), True))
56-
if (isWindows() or isMac()):
57-
ProcessingConfig.addSetting(Setting("SAGA",
58-
SagaUtils.SAGA_FOLDER, self.tr('SAGA folder'),
59-
'',
60-
valuetype=Setting.FOLDER))
6156
ProcessingConfig.addSetting(Setting("SAGA",
6257
SagaUtils.SAGA_IMPORT_EXPORT_OPTIMIZATION,
6358
self.tr('Enable SAGA Import/Export optimizations'), False))
@@ -73,9 +68,6 @@ def load(self):
7368

7469
def unload(self):
7570
ProcessingConfig.removeSetting('ACTIVATE_SAGA')
76-
if (isWindows() or isMac()):
77-
ProcessingConfig.removeSetting(SagaUtils.SAGA_FOLDER)
78-
7971
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_CONSOLE)
8072
ProcessingConfig.removeSetting(SagaUtils.SAGA_LOG_COMMANDS)
8173

‎python/plugins/processing/algs/saga/SagaUtils.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
SAGA_LOG_COMMANDS = 'SAGA_LOG_COMMANDS'
4141
SAGA_LOG_CONSOLE = 'SAGA_LOG_CONSOLE'
42-
SAGA_FOLDER = 'SAGA_FOLDER'
4342
SAGA_IMPORT_EXPORT_OPTIMIZATION = 'SAGA_IMPORT_EXPORT_OPTIMIZATION'
4443

4544
_installedVersion = None
@@ -83,13 +82,10 @@ def findSagaFolder():
8382

8483

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

88+
folder = findSagaFolder()
9389
return folder or ''
9490

9591

0 commit comments

Comments
 (0)
Please sign in to comment.