Skip to content
Permalink
Browse files

Don't lose properties of existing outputs when editing algorithm

  • Loading branch information
nyalldawson committed Mar 4, 2020
1 parent 13fc85d commit 03fc03355de45386de8ac007c1c1f4bfd13665a7
Showing with 5 additions and 1 deletion.
  1. +5 −1 python/plugins/processing/modeler/ModelerGraphicItem.py
@@ -140,11 +140,15 @@ def updateAlgorithm(self, alg):
alg.setLinksCollapsed(Qt.TopEdge, existing_child.linksCollapsed(Qt.TopEdge))
alg.setLinksCollapsed(Qt.BottomEdge, existing_child.linksCollapsed(Qt.BottomEdge))
alg.comment().setPosition(existing_child.comment().position())
alg.comment().setSize(existing_child.comment().size())
for i, out in enumerate(alg.modelOutputs().keys()):
alg.modelOutput(out).setPosition(alg.modelOutput(out).position()
alg.modelOutput(out).setPosition(existing_child.modelOutput(out).position()
or alg.position() + QPointF(
self.component().size().width(),
(i + 1.5) * self.component().size().height()))
alg.modelOutput(out).comment().setDescription(existing_child.modelOutput(out).comment().description())
alg.modelOutput(out).comment().setSize(existing_child.modelOutput(out).comment().size())
alg.modelOutput(out).comment().setPosition(existing_child.modelOutput(out).comment().position())
self.model().setChildAlgorithm(alg)


0 comments on commit 03fc033

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