From 928870949730b5c3c72b91cc13ec9062b4116504 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Mon, 17 Feb 2025 17:22:32 -0500 Subject: [PATCH] Trigger onSelectionChange on deleteSelected (#539) --- src/LGraphCanvas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LGraphCanvas.ts b/src/LGraphCanvas.ts index 571e36bad7..0b8743d615 100644 --- a/src/LGraphCanvas.ts +++ b/src/LGraphCanvas.ts @@ -3917,11 +3917,11 @@ export class LGraphCanvas implements ConnectionColorContext { } } - this.selectedItems.clear() this.selected_nodes = {} this.selectedItems.clear() this.current_node = null this.highlighted_links = {} + this.onSelectionChange?.(this.selected_nodes) this.setDirty(true) graph.afterChange() this.emitAfterChange()