Early return in LGraphCanvas.deselectAll (#856)

Avoid trigger `onSelectionChange` when nothing is selected.
This commit is contained in:
Chenlei Hu
2025-03-25 10:22:40 -04:00
committed by GitHub
parent 27895dac00
commit 808d78169b

View File

@@ -3436,6 +3436,8 @@ export class LGraphCanvas implements ConnectionColorContext {
if (!this.graph) return
const selected = this.selectedItems
if (!selected.size) return
let wasSelected: Positionable | undefined
for (const sel of selected) {
if (sel === keepSelected) {