mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] Add option whether to load batch output layers on completion
By always trying to load all layers, we severely limit the usefulness of batch processing. E.g. try clipping 200 layers - and then get ready to punch something as you wait for all the results to load.
This commit is contained in:
parent
3fc90301a9
commit
2ed2248827
@ -81,6 +81,9 @@ class BatchAlgorithmDialog(AlgorithmDialogBase):
|
||||
|
||||
feedback = self.createFeedback()
|
||||
|
||||
load_layers = self.mainWidget.checkLoadLayersOnCompletion.isChecked()
|
||||
project = QgsProject.instance() if load_layers else None
|
||||
|
||||
for row in range(self.mainWidget.tblParameters.rowCount()):
|
||||
col = 0
|
||||
parameters = {}
|
||||
@ -107,7 +110,7 @@ class BatchAlgorithmDialog(AlgorithmDialogBase):
|
||||
if isinstance(out, (QgsProcessingParameterRasterDestination,
|
||||
QgsProcessingParameterFeatureSink)):
|
||||
# load rasters and sinks on completion
|
||||
parameters[out.name()] = QgsProcessingOutputLayerDefinition(text, QgsProject.instance())
|
||||
parameters[out.name()] = QgsProcessingOutputLayerDefinition(text, project)
|
||||
else:
|
||||
parameters[out.name()] = text
|
||||
col += 1
|
||||
|
@ -120,6 +120,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="6">
|
||||
<widget class="QCheckBox" name="checkLoadLayersOnCompletion">
|
||||
<property name="text">
|
||||
<string>Load layers on completion</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user