From: Alexis Ehret Date: Tue, 21 Feb 2023 13:13:05 +0000 (+0100) Subject: Fix entity group menu X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=d060e1e9af21ba43674b77ad57dbcfea6ee3ed42;p=space-station-14.git Fix entity group menu Before this commit the entity submenu was always the submenu of the first entity in the group. Now the submenu is uniq to the current entity selected. --- diff --git a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs index 21ebd8e74e..b33366ee63 100644 --- a/Content.Client/ContextMenu/UI/EntityMenuUIController.cs +++ b/Content.Client/ContextMenu/UI/EntityMenuUIController.cs @@ -260,7 +260,7 @@ namespace Content.Client.ContextMenu.UI { var subElement = new EntityMenuElement(entity); subElement.SubMenu = new ContextMenuPopup(_context, subElement); - subElement.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(group[0], popup: subElement.SubMenu); + subElement.SubMenu.OnPopupOpen += () => _verb.OpenVerbMenu(entity, popup: subElement.SubMenu); subElement.SubMenu.OnPopupHide += subElement.SubMenu.MenuBody.DisposeAllChildren; _context.AddElement(subMenu, subElement); Elements.TryAdd(entity, subElement);