Skip to content
Permalink
Browse files

[processing] Add option whether to load batch output layers on comple…

…tion

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
@@ -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,
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/>

0 comments on commit 2ed2248

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