[processing] add nocrswarning option to scripts

fixes #12784
This commit is contained in:
volaya 2016-01-14 11:41:41 +01:00
parent f8f25289d3
commit 8884c37b6f

View File

@ -71,6 +71,7 @@ class ScriptAlgorithm(GeoAlgorithm):
GeoAlgorithm.__init__(self)
self.script = script
self.allowEdit = True
self.noCRSWarning = False
self.descriptionFile = descriptionFile
if script is not None:
self.defineCharacteristicsFromScript()
@ -120,6 +121,12 @@ class ScriptAlgorithm(GeoAlgorithm):
except:
pass
def checkInputCRS(self):
if self.noCRSWarning:
return True
else:
return GeoAlgorithm.checkInputCRS(self)
def createDescriptiveName(self, s):
return s.replace('_', ' ')
@ -137,6 +144,9 @@ class ScriptAlgorithm(GeoAlgorithm):
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':