Skip to content

Commit

Permalink
[processing] add group id to SAGA algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 14, 2017
1 parent 6f43954 commit 5e157c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions python/plugins/processing/algs/saga/SagaAlgorithm.py
Expand Up @@ -73,6 +73,7 @@ def __init__(self, descriptionfile):
self._name = ''
self._display_name = ''
self._group = ''
self._groupId = ''
self.params = []
self.defineCharacteristicsFromFile()

Expand All @@ -92,6 +93,9 @@ def displayName(self):
def group(self):
return self._group

def groupId(self):
return self._groupId

def shortHelpString(self):
return shortHelp.get(self.id(), None)

Expand Down Expand Up @@ -119,6 +123,10 @@ def defineCharacteristicsFromFile(self):
line = lines.readline().strip('\n').strip()
self.undecorated_group = line
self._group = self.tr(decoratedGroupName(self.undecorated_group))

validChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:'
grpName = decoratedGroupName(self.undecorated_group).lower()
self._groupId = ''.join(c for c in grpName if c in validChars)
line = lines.readline().strip('\n').strip()
while line != '':
if line.startswith('Hardcoded'):
Expand Down

0 comments on commit 5e157c9

Please sign in to comment.