From 196645ce7e656186e9f963e0980fad6c8de2f8c3 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Tue, 18 Feb 2025 11:49:06 -0500 Subject: [PATCH] Clear selectedItems on canvas clear (#543) --- src/LGraphCanvas.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index 2573412df..f1004f8a6 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -1590,6 +1590,8 @@ export class LGraphCanvas implements ConnectionColorContext { this.selected_nodes = {} this.selected_group = null + this.selectedItems.clear() + this.onSelectionChange?.(this.selected_nodes) this.visible_nodes = [] this.node_over = null