mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing][gdal] Skip expensive parameter validation when just showing command in dialog
This commit is contained in:
parent
e0255b305d
commit
044470d38f
@ -113,7 +113,7 @@ class GdalParametersPanel(ParametersPanel):
|
||||
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 @@ class buildvrt(GdalAlgorithm):
|
||||
# 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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user