Skip to content
Permalink
Browse files

[processing][gdal] Skip expensive parameter validation when just show…

…ing command in dialog

(cherry-picked from 044470d)
  • Loading branch information
nyalldawson committed Mar 22, 2018
1 parent 50c239b commit 6604def2e7107c4d1f263679ba4b8d933211b08c
@@ -113,7 +113,7 @@ def parametersHaveChanged(self):
parameters[output.name()] = self.tr("[temporary file]")
for p in self.alg.parameterDefinitions():
if (not p.name() in parameters and not p.flags() & QgsProcessingParameterDefinition.FlagOptional) \
or (not p.checkValueIsAcceptable(parameters[p.name()], context)):
or (not p.checkValueIsAcceptable(parameters[p.name()])):
# not ready yet
self.text.setPlainText('')
return
@@ -115,10 +115,11 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
# length of the command will be longer then allowed in command prompt
listFile = os.path.join(QgsProcessingUtils.tempFolder(), 'buildvrtInputFiles.txt')
with open(listFile, 'w') as f:
layers = []
for l in self.parameterAsLayerList(parameters, self.INPUT, context):
layers.append(l.source())
f.write('\n'.join(layers))
if executing:
layers = []
for l in self.parameterAsLayerList(parameters, self.INPUT, context):
layers.append(l.source())
f.write('\n'.join(layers))
arguments.append('-input_file_list')
arguments.append(listFile)

0 comments on commit 6604def

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