diff --git a/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-2x-linux.png b/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-2x-linux.png index ec41fd109..dcf176b11 100644 Binary files a/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-2x-linux.png and b/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-2x-linux.png differ diff --git a/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-linux.png b/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-linux.png index 698d7a1b7..c9056497f 100644 Binary files a/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-linux.png and b/browser_tests/rightClickMenu.spec.ts-snapshots/right-click-node-group-node-chromium-linux.png differ diff --git a/src/extensions/core/groupNode.ts b/src/extensions/core/groupNode.ts index 358362625..7fc4ed49f 100644 --- a/src/extensions/core/groupNode.ts +++ b/src/extensions/core/groupNode.ts @@ -404,35 +404,15 @@ export class GroupNodeConfig { inputName let key = name let prefix = '' - - // Ensure seenInputs is initialized before checking - seenInputs[key] = (seenInputs[key] ?? 0) + 1 - // Special handling for primitive to include the title if it is set rather than just "value" - if ((node.type === 'PrimitiveNode' && node.title) || seenInputs[name] > 1) { + if ((node.type === 'PrimitiveNode' && node.title) || name in seenInputs) { prefix = `${node.title ?? node.type} ` key = name = `${prefix}${inputName}` - - // Ensure seenInputs is initialized before checking it - seenInputs[name] = seenInputs[name] ?? 0 - - let finalName - if (seenInputs[name] > 0) { - // If a duplicate is found, append an incremental number - prefix = `${node.title ?? node.type} ` - finalName = `${prefix} ${seenInputs[name] + 1} ${inputName}` - } else { - // Use the original name if it's the first time - prefix = `${node.title ?? node.type} ` - finalName = `${prefix}${inputName}` + if (name in seenInputs) { + name = `${prefix}${seenInputs[name]} ${inputName}` } - - // Store the incremented count for tracking duplicates - seenInputs[name]++ - - // Ensure the name is added to the definition list correctly - this.nodeDef.input.required[finalName] = config } + seenInputs[key] = (seenInputs[key] ?? 1) + 1 if (inputName === 'seed' || inputName === 'noise_seed') { if (!extra) extra = {} @@ -660,32 +640,24 @@ export class GroupNodeConfig { this.nodeDef.output.push(def.output[outputId]) this.nodeDef.output_is_list.push(def.output_is_list[outputId]) - // Try to get a custom name from the configuration if it exists - let label = - customConfig?.name ?? - // If no custom name, check if the definition provides an output name - def.output_name?.[outputId] ?? - // If neither exist, fallback to the raw output type (e.g., "FLOAT", "INT") - def.output[outputId] - - // Check if label is missing and fallback + let label = customConfig?.name if (!label) { - const output = node.outputs.find((o) => o.name) - label = output?.label ?? 'UnnamedOutput' + label = def.output_name?.[outputId] ?? def.output[outputId] + const output = node.outputs.find((o) => o.name === label) + if (output?.label) { + label = output.label + } } let name = label - - // Always prefix with node title or type - const prefix = `${node.title ?? node.type} ` - name = `${prefix}${label}` - - // Apply the same duplicate tracking logic as inputs - if (seenOutputs[name]) { - name = `${prefix} ${seenOutputs[name] + 1} ${label}` + if (name in seenOutputs) { + const prefix = `${node.title ?? node.type} ` + name = `${prefix}${label}` + if (name in seenOutputs) { + name = `${prefix}${node.index} ${label}` + } } - - seenOutputs[name] = (seenOutputs[name] ?? 0) + 1 + seenOutputs[name] = 1 this.nodeDef.output_name.push(name) } diff --git a/src/locales/en/settings.json b/src/locales/en/settings.json index fc7b383de..fe9362a5f 100644 --- a/src/locales/en/settings.json +++ b/src/locales/en/settings.json @@ -324,6 +324,9 @@ "LiteGraph_ContextMenu_Scaling": { "name": "Scale node combo widget menus (lists) when zoomed in" }, + "LiteGraph_Node_TooltipDelay": { + "name": "Tooltip Delay" + }, "pysssss_SnapToGrid": { "name": "Always snap to grid" } diff --git a/src/locales/fr/settings.json b/src/locales/fr/settings.json index a82437b3c..60c1df387 100644 --- a/src/locales/fr/settings.json +++ b/src/locales/fr/settings.json @@ -324,6 +324,9 @@ "LiteGraph_ContextMenu_Scaling": { "name": "Mise à l'échelle des menus de widgets combinés de nœuds (listes) lors du zoom" }, + "LiteGraph_Node_TooltipDelay": { + "name": "Délai d'infobulle" + }, "pysssss_SnapToGrid": { "name": "Toujours aligner sur la grille" } diff --git a/src/locales/ja/settings.json b/src/locales/ja/settings.json index 61ce7192f..b99c7956e 100644 --- a/src/locales/ja/settings.json +++ b/src/locales/ja/settings.json @@ -324,6 +324,9 @@ "LiteGraph_ContextMenu_Scaling": { "name": "ズームイン時にノードコンボウィジェットメニュー(リスト)をスケーリングする" }, + "LiteGraph_Node_TooltipDelay": { + "name": "ツールチップ遅延" + }, "pysssss_SnapToGrid": { "name": "常にグリッドにスナップ" } diff --git a/src/locales/ko/settings.json b/src/locales/ko/settings.json index fe0b7e41e..9ea3120b0 100644 --- a/src/locales/ko/settings.json +++ b/src/locales/ko/settings.json @@ -324,6 +324,9 @@ "LiteGraph_ContextMenu_Scaling": { "name": "확대시 노드 콤보 위젯 메뉴 (목록) 스케일링" }, + "LiteGraph_Node_TooltipDelay": { + "name": "툴팁 지연" + }, "pysssss_SnapToGrid": { "name": "항상 그리드에 스냅" } diff --git a/src/locales/ru/settings.json b/src/locales/ru/settings.json index 69a085d9a..41f1a4f0a 100644 --- a/src/locales/ru/settings.json +++ b/src/locales/ru/settings.json @@ -324,6 +324,9 @@ "LiteGraph_ContextMenu_Scaling": { "name": "Масштабирование комбинированных виджетов меню узлов (списков) при увеличении" }, + "LiteGraph_Node_TooltipDelay": { + "name": "Задержка всплывающей подсказки" + }, "pysssss_SnapToGrid": { "name": "Всегда привязываться к сетке" } diff --git a/src/locales/zh/settings.json b/src/locales/zh/settings.json index 6f1d16fbd..e06ce6980 100644 --- a/src/locales/zh/settings.json +++ b/src/locales/zh/settings.json @@ -324,6 +324,9 @@ "LiteGraph_ContextMenu_Scaling": { "name": "放大时缩放节点组合部件菜单(列表)" }, + "LiteGraph_Node_TooltipDelay": { + "name": "工具提示延迟" + }, "pysssss_SnapToGrid": { "name": "始终吸附到网格" }