Skip to content
Permalink
Browse files

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

should fix #15060 and #15480
  • Loading branch information
volaya committed Oct 4, 2016
1 parent 421251a commit f7c639c169b4b96aa963d8a7effc9723e8bc34a7
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/processing/modeler/ModelerAlgorithm.py
@@ -210,7 +210,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 f7c639c

Please sign in to comment.