From 792aa5ae9ca5b2c29ec32fa98bb0d0ca733b09c5 Mon Sep 17 00:00:00 2001 From: RichardFrangenberg Date: Fri, 7 Jun 2024 17:54:29 +0100 Subject: [PATCH] don't do autolayout if nodegraph has position attributes --- src/QuiltiX/qx_nodegraph.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/QuiltiX/qx_nodegraph.py b/src/QuiltiX/qx_nodegraph.py index 6589b0e..a262033 100644 --- a/src/QuiltiX/qx_nodegraph.py +++ b/src/QuiltiX/qx_nodegraph.py @@ -751,6 +751,9 @@ def load_graph_from_mx_doc(self, doc): for mx_graph in doc.getNodeGraphs(): ng_node = self.create_nodegraph_from_mx_nodegraph(mx_graph) for cur_mx_node in mx_graph.getNodes(): + if cur_mx_node.hasAttribute("xpos") and cur_mx_node.hasAttribute("ypos"): + had_pos = True + cur_qx_node = self.create_node_from_mx_node(cur_mx_node, graph=ng_node.get_sub_graph()) # Change value type of node qx_node_to_mx_node[cur_qx_node] = cur_mx_node