From dd2e4162af9b6e1ab070f4cdc866f9f4be927985 Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Mon, 6 Jan 2020 08:13:42 +0100 Subject: [PATCH] Fixed problem that could occur when deleting nodes --- addons/material_maker/graph_edit.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/material_maker/graph_edit.gd b/addons/material_maker/graph_edit.gd index 613ce04..a511ff8 100644 --- a/addons/material_maker/graph_edit.gd +++ b/addons/material_maker/graph_edit.gd @@ -110,7 +110,7 @@ func clear_view() -> void: for c in get_children(): if c is GraphNode: if c == last_selected: - set_last_selected(c) + set_last_selected(null) remove_child(c) c.free() @@ -376,6 +376,6 @@ func _on_GraphEdit_gui_input(event) -> void: call_deferred("check_last_selected") func check_last_selected() -> void: - if last_selected != null and !(is_instance_valid(last_selected) && last_selected.selected): + if last_selected != null and !(is_instance_valid(last_selected) and last_selected.selected): last_selected = null emit_signal("node_selected", null)