Skip to content

Commit

Permalink
[processing][saga] Stop showing 'available providers' tip for SAGA, w…
Browse files Browse the repository at this point in the history
…hen it's not available anyway
  • Loading branch information
nyalldawson committed Jul 16, 2018
1 parent 7f9b0f8 commit 3180988
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions python/plugins/processing/algs/saga/SagaAlgorithmProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def isActive(self):
def setActive(self, active):
ProcessingConfig.setSettingValue('ACTIVATE_SAGA', active)

def canBeActivated(self):
version = SagaUtils.getInstalledVersion(True)
if version is not None and version.startswith(REQUIRED_VERSION):
return True
return False

def loadAlgorithms(self):
version = SagaUtils.getInstalledVersion(True)
if version is None:
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/gui/ProcessingToolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def disabledProviders(self):
return False

for provider in QgsApplication.processingRegistry().providers():
if not provider.isActive():
if not provider.isActive() and provider.canBeActivated():
return True

return False
Expand Down

0 comments on commit 3180988

Please sign in to comment.