Skip to content

Commit

Permalink
[processing] add nocrswarning option to scripts
Browse files Browse the repository at this point in the history
fixes #12784
  • Loading branch information
volaya committed Jan 14, 2016
1 parent f8f2528 commit 8884c37
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/plugins/processing/script/ScriptAlgorithm.py
Expand Up @@ -71,6 +71,7 @@ def __init__(self, descriptionFile, script=None):
GeoAlgorithm.__init__(self)
self.script = script
self.allowEdit = True
self.noCRSWarning = False
self.descriptionFile = descriptionFile
if script is not None:
self.defineCharacteristicsFromScript()
Expand Down Expand Up @@ -120,6 +121,12 @@ def defineCharacteristicsFromScript(self):
except:
pass

def checkInputCRS(self):
if self.noCRSWarning:
return True
else:
return GeoAlgorithm.checkInputCRS(self)

def createDescriptiveName(self, s):
return s.replace('_', ' ')

Expand All @@ -137,6 +144,9 @@ def processParameterLine(self, line):
if line == "nomodeler":
self.showInModeler = False
return
if line == "nocrswarning":
self.noCRSWarning = True
return
tokens = line.split('=', 1)
desc = self.createDescriptiveName(tokens[0])
if tokens[1].lower().strip() == 'group':
Expand Down

0 comments on commit 8884c37

Please sign in to comment.