pygui: updated logic to use new canvases when receiving node delete messages

This commit is contained in:
Blake Harnden 2021-01-02 09:35:39 -08:00
parent a7d7b94215
commit f24d5f20b4

View file

@ -239,9 +239,9 @@ class CoreClient:
canvas_node.update_icon(node.icon)
elif event.message_type == MessageType.DELETE:
canvas_node = self.canvas_nodes[node.id]
self.app.canvas.clear_selection()
self.app.canvas.select_object(canvas_node.id)
self.app.canvas.delete_selected_objects()
canvas_node.canvas.clear_selection()
canvas_node.canvas.select_object(canvas_node.id)
canvas_node.canvas.delete_selected_objects()
elif event.message_type == MessageType.ADD:
if node.id in self.session.nodes:
logging.error("core node already exists: %s", node)