Skip to content
Permalink
Browse files

[processing] fix modeler output values in case algorithm(s)

execution modifies those (fixes #16021)
(cherry picked from commit 9908d9c)
  • Loading branch information
nirvn authored and alexbruy committed Jan 24, 2017
1 parent b6fb784 commit da3eb06b8bc9d6ac6386c89fe6b852a3b2f7bc93
Showing with 9 additions and 0 deletions.
  1. +9 −0 python/plugins/processing/modeler/ModelerAlgorithm.py
@@ -491,6 +491,15 @@ def processAlgorithm(self, progress):
t0 = time.time()
alg.algorithm.execute(progress, self)
dt = time.time() - t0

# copy algorithm output value(s) back to model in case the algorithm modified those
for out in alg.algorithm.outputs:
if not out.hidden:
if out.name in alg.outputs:
modelOut = self.getOutputFromName(self.getSafeNameForOutput(alg.name, out.name))
if modelOut:
modelOut.value = out.value

executed.append(alg.name)
progress.setDebugInfo(
self.tr('OK. Execution took %0.3f ms (%i outputs).', 'ModelerAlgorithm') % (dt, len(alg.algorithm.outputs)))

0 comments on commit da3eb06

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