[backport 1.25] Reorder subgraph context menu items (#4881)

Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Comfy Org PR Bot
2025-08-10 08:26:24 +08:00
committed by GitHub
parent 8872caaf4d
commit b35525578c

View File

@@ -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))