Skip to content
Permalink
Browse files

[processing] alternative way of copying algorithms in a model.

should fix #15060 and #15480
  • Loading branch information
volaya authored and alexbruy committed Oct 18, 2016
1 parent eb5fc90 commit 22a6c473d95479c13522b9c93e7401de86035af0
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/processing/modeler/ModelerAlgorithm.py
@@ -235,7 +235,11 @@ class ModelerAlgorithm(GeoAlgorithm):
def getCopy(self):
newone = ModelerAlgorithm()
newone.provider = self.provider
newone.algs = copy.deepcopy(self.algs)

newone.algs = {}
for algname, alg in self.algs.iteritems():
newone.algs[algname] = Algorithm()
newone.algs[algname].__dict__.update(copy.deepcopy(alg.todict()))
newone.inputs = copy.deepcopy(self.inputs)
newone.defineCharacteristics()
newone.name = self.name

0 comments on commit 22a6c47

Please sign in to comment.