From b35525578cb72da312ce906ecaa10fb904994a32 Mon Sep 17 00:00:00 2001 From: Comfy Org PR Bot Date: Sun, 10 Aug 2025 08:26:24 +0800 Subject: [PATCH] [backport 1.25] Reorder subgraph context menu items (#4881) Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com> Co-authored-by: github-actions --- src/lib/litegraph/src/LGraphCanvas.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/litegraph/src/LGraphCanvas.ts b/src/lib/litegraph/src/LGraphCanvas.ts index 4166807ab..5b375c902 100644 --- a/src/lib/litegraph/src/LGraphCanvas.ts +++ b/src/lib/litegraph/src/LGraphCanvas.ts @@ -8242,14 +8242,16 @@ export class LGraphCanvas 'Both in put and output slots were null when processing context menu.' ) + if (!_slot.nameLocked && !('link' in _slot && _slot.widget)) { + menu_info.push({ content: 'Rename Slot', slot }) + } + if (_slot.removable) { + menu_info.push(null) menu_info.push( _slot.locked ? 'Cannot remove' : { content: 'Remove Slot', slot } ) } - if (!_slot.nameLocked && !('link' in _slot && _slot.widget)) { - menu_info.push({ content: 'Rename Slot', slot }) - } if (node.getExtraSlotMenuOptions) { menu_info.push(...node.getExtraSlotMenuOptions(slot))