From 0a2b66bd9ec03ce75f02e229b4e8d4e58061b28e Mon Sep 17 00:00:00 2001 From: niknah Date: Tue, 26 Aug 2025 09:54:58 +1000 Subject: [PATCH] Disable quick-connections on subgraphs https://github.com/niknah/quick-connections/issues/28 --- README.md | 1 + js/QuickConnection.js | 7 +++++++ pyproject.toml | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index be13206..fa26916 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ python -m http.server ## Changelog +2025-08-26 v1.0.20: Disable quick-connections in subgraphs, not working. 2025-08-23 v1.0.19: Possible crashes in subgraph node fix. https://github.com/niknah/quick-connections/issues/25 2025-07-15 v1.0.17: Draw connections in subgraph mode. https://github.com/niknah/quick-connections/issues/24 2025-07-04 v1.0.16: Problem with the enable/disable toggle not working. https://github.com/niknah/quick-connections/issues/19 diff --git a/js/QuickConnection.js b/js/QuickConnection.js index 93bddfe..9ee7b33 100644 --- a/js/QuickConnection.js +++ b/js/QuickConnection.js @@ -78,6 +78,10 @@ export class QuickConnection { console.error('no canvas', this.canvas); // eslint-disable-line no-console } else { this.canvas.canvas.addEventListener('litegraph:canvas', (e) => { + if (this.canvas?.subgraph) { + return; + } + const { detail } = e; if (!this.release_link_on_empty_shows_menu && detail && detail.subType === 'empty-release' @@ -220,6 +224,9 @@ export class QuickConnection { console.error('no canvas or mouse yet', this.canvas); // eslint-disable-line no-console return; } + if (this.canvas.subgraph) { + return; + } this.insideConnection = null; diff --git a/pyproject.toml b/pyproject.toml index 0a4302b..de30f79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "quick-connections" description = "Quick connections, Circuit board connections" -version = "1.0.19" +version = "1.0.20" license = {text = "MIT License"} [project.urls]