Skip to content

Commit

Permalink
[processing][saga] Difference and symmetric difference algorithms hav…
Browse files Browse the repository at this point in the history
…e known issues in SAGA LTR
  • Loading branch information
nyalldawson committed Mar 5, 2019
1 parent 63d6487 commit 8bef710
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/plugins/processing/algs/saga/SagaAlgorithm.py
Expand Up @@ -78,6 +78,7 @@ def __init__(self, descriptionfile):
self._group = ''
self._groupId = ''
self.params = []
self.known_issues = False
self.defineCharacteristicsFromFile()

def createInstance(self):
Expand Down Expand Up @@ -110,11 +111,15 @@ def svgIconPath(self):

def flags(self):
# TODO - maybe it's safe to background thread this?
return super().flags() | QgsProcessingAlgorithm.FlagNoThreading
f = super().flags() | QgsProcessingAlgorithm.FlagNoThreading
if self.known_issues:
f = f | QgsProcessingAlgorithm.FlagKnownIssues
return f

def defineCharacteristicsFromFile(self):
with open(self.description_file, encoding="utf-8") as lines:
line = lines.readline().strip('\n').strip()

self._name = line
if '|' in self._name:
tokens = self._name.split('|')
Expand All @@ -134,6 +139,10 @@ def defineCharacteristicsFromFile(self):
self._name = ''.join(c for c in self._name if c in validChars)

line = lines.readline().strip('\n').strip()
if line == '##known_issues':
self.known_issues = True
line = lines.readline().strip('\n').strip()

self.undecorated_group = line
self._group = self.tr(decoratedGroupName(self.undecorated_group))

Expand Down
@@ -1,4 +1,5 @@
Difference
##known_issues
shapes_polygons
QgsProcessingParameterFeatureSource|A|Layer A|2|None|False
QgsProcessingParameterFeatureSource|B|Layer B|2|None|False
Expand Down
@@ -1,4 +1,5 @@
Symmetrical Difference
##known_issues
shapes_polygons
QgsProcessingParameterFeatureSource|A|Layer A|2|None|False
QgsProcessingParameterFeatureSource|B|Layer B|2|None|False
Expand Down

0 comments on commit 8bef710

Please sign in to comment.