From b365a4ed25be0bfc1a3d7f27ea6eac9647425996 Mon Sep 17 00:00:00 2001 From: Tan Jian Ping Date: Mon, 13 Dec 2021 21:26:50 +0800 Subject: [PATCH] Fix weird offset when dragging state #36 --- addons/imjp94.yafsm/scenes/flowchart/FlowChart.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/imjp94.yafsm/scenes/flowchart/FlowChart.gd b/addons/imjp94.yafsm/scenes/flowchart/FlowChart.gd index 408cd3e..1253c3b 100644 --- a/addons/imjp94.yafsm/scenes/flowchart/FlowChart.gd +++ b/addons/imjp94.yafsm/scenes/flowchart/FlowChart.gd @@ -581,7 +581,8 @@ func select(node): # Deselect a node func deselect(node): _selection.erase(node) - node.selected = false + if is_instance_valid(node): + node.selected = false _drag_origins.pop_back() emit_signal("node_deselected", node)