From b57885e3d7f21a863e08c5fb155d559ee6773a78 Mon Sep 17 00:00:00 2001 From: Mohsen Karami Date: Fri, 3 Mar 2023 10:33:42 +0330 Subject: [PATCH] Prevent unselecting blocks if the user double-clicks on them. --- src/litegraph.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/litegraph.js b/src/litegraph.js index cd8a6897fe..6786c48903 100644 --- a/src/litegraph.js +++ b/src/litegraph.js @@ -6063,6 +6063,12 @@ LGraphNode.prototype.executeAction = function(action) this.node_dragged = node; } this.processNodeSelected(node, e); + } else { // double-click + /** + * Don't call the function if the block is already selected. + * Otherwise, it could cause the block to be unselected while its panel is open. + */ + if (!node.is_selected) this.processNodeSelected(node, e); } this.dirty_canvas = true;