Skip to content
Permalink
Browse files

Merge pull request #6656 from nyalldawson/gdal_dlg

[processing][gdal] Skip expensive parameter validation when just showing command in dialog
  • Loading branch information
alexbruy committed Mar 21, 2018
2 parents 29e00ae + 044470d commit 51ce2fb79ea196ebae69959e177f262e6be0d6cf
@@ -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 51ce2fb

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