Skip to content
Browse files
[processing] Add option whether to load batch output layers on comple…

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.
  • Loading branch information
nyalldawson committed Nov 10, 2017
1 parent 3fc9030 commit 2ed224882789ede58664174e20b8facc487db172
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
@@ -81,6 +81,9 @@ def accept(self):

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 @@ def accept(self):
if isinstance(out, (QgsProcessingParameterRasterDestination,
# load rasters and sinks on completion
parameters[] = QgsProcessingOutputLayerDefinition(text, QgsProject.instance())
parameters[] = QgsProcessingOutputLayerDefinition(text, project)
parameters[] = text
col += 1
@@ -120,6 +120,13 @@
<item row="2" column="0" colspan="6">
<widget class="QCheckBox" name="checkLoadLayersOnCompletion">
<property name="text">
<string>Load layers on completion</string>

0 comments on commit 2ed2248

Please sign in to comment.