Fix deselect delete (#51)

* Fix deselect per-node always fails silently

* Fix shift + drag node relying on broken deselect
This commit is contained in:
filtered
2024-08-07 01:32:04 +10:00
committed by GitHub
parent d2ef32fcb5
commit f937ff5ec5

View File

@@ -6176,7 +6176,10 @@ LGraphNode.prototype.executeAction = function(action)
this.graph.beforeChange();
this.node_dragged = node;
}
this.processNodeSelected(node, e);
// Account for shift + click + drag
if (!(e.shiftKey && !e.ctrlKey && !e.altKey) || !node.is_selected) {
this.processNodeSelected(node, e);
}
} else { // double-click
/**
* Don't call the function if the block is already selected.
@@ -7518,6 +7521,7 @@ LGraphNode.prototype.executeAction = function(action)
node.onDeselected();
}
node.is_selected = false;
delete this.selected_nodes[node.id]
if (this.onNodeDeselected) {
this.onNodeDeselected(node);