Skip to content

Commit f7c639c

Browse files
committedOct 4, 2016
[processing] alternative way of copying algorithms in a model.
should fix #15060 and #15480
1 parent 421251a commit f7c639c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎python/plugins/processing/modeler/ModelerAlgorithm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ class ModelerAlgorithm(GeoAlgorithm):
210210
def getCopy(self):
211211
newone = ModelerAlgorithm()
212212
newone.provider = self.provider
213-
newone.algs = copy.deepcopy(self.algs)
213+
214+
newone.algs = {}
215+
for algname, alg in self.algs.iteritems():
216+
newone.algs[algname] = Algorithm()
217+
newone.algs[algname].__dict__.update(copy.deepcopy(alg.todict()))
214218
newone.inputs = copy.deepcopy(self.inputs)
215219
newone.defineCharacteristics()
216220
newone.name = self.name

0 commit comments

Comments
 (0)
Please sign in to comment.