From 41c89b1b2408ad28dc4f92e1cfe8e84e9cf39a8d Mon Sep 17 00:00:00 2001 From: Johnny Chan Date: Wed, 24 Jan 2024 11:56:38 +1300 Subject: [PATCH] clean up fix. --- NodeGraphQt/base/commands.py | 2 +- NodeGraphQt/qgraphics/node_base.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NodeGraphQt/base/commands.py b/NodeGraphQt/base/commands.py index 67e382b0..fffdb4ce 100644 --- a/NodeGraphQt/base/commands.py +++ b/NodeGraphQt/base/commands.py @@ -36,7 +36,7 @@ def set_node_property(self, name, value): # view widgets. if hasattr(view, 'widgets') and name in view.widgets.keys(): # check if previous value is identical to current value, - # prevent signals from causing a infinite loop. + # prevent signals from causing an infinite loop. if view.widgets[name].get_value() != value: view.widgets[name].set_value(value) diff --git a/NodeGraphQt/qgraphics/node_base.py b/NodeGraphQt/qgraphics/node_base.py index 9d57ae84..3f0e8864 100644 --- a/NodeGraphQt/qgraphics/node_base.py +++ b/NodeGraphQt/qgraphics/node_base.py @@ -1049,7 +1049,7 @@ def has_widget(self, name): def from_dict(self, node_dict): super(NodeItem, self).from_dict(node_dict) - custom_prop = node_dict.pop('custom') or {} + custom_prop = node_dict.get('custom') or {} for prop_name, value in custom_prop.items(): prop_widget = self._widgets.get(prop_name) if prop_widget: