Skip to content
Permalink
Browse files

[processing][saga] Difference and symmetric difference algorithms hav…

…e known issues in SAGA LTR

(cherry picked from commit 8bef710)
  • Loading branch information
nyalldawson committed Mar 5, 2019
1 parent 4776cd2 commit 4eecfb926b716b9e7c8cb9a0b69c007d7ddd7138
@@ -78,6 +78,7 @@ def __init__(self, descriptionfile):
self._group = ''
self._groupId = ''
self.params = []
self.known_issues = False
self.defineCharacteristicsFromFile()

def createInstance(self):
@@ -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('|')
@@ -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))

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

0 comments on commit 4eecfb9

Please sign in to comment.
You can’t perform that action at this time.