Skip to content

Commit

Permalink
[processing] alternative way of copying algorithms in a model.
Browse files Browse the repository at this point in the history
should fix #15060 and #15480
  • Loading branch information
volaya committed Oct 4, 2016
1 parent 421251a commit f7c639c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/plugins/processing/modeler/ModelerAlgorithm.py
Expand Up @@ -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
Expand Down

0 comments on commit f7c639c

Please sign in to comment.