Skip to content
Permalink
Browse files

[processing] add nocrswarning option to scripts

fixes #12784
  • Loading branch information
volaya committed Jan 14, 2016
1 parent f8f2528 commit 8884c37b6f33d1d1aa42ac4dfb92def557a55fab
Showing with 10 additions and 0 deletions.
  1. +10 −0 python/plugins/processing/script/ScriptAlgorithm.py
@@ -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()
@@ -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('_', ' ')

@@ -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':

0 comments on commit 8884c37

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