Change VerbMenu categories to only execute solitary verbs (#6100)

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
This commit is contained in:
ShadowCommander
2022-01-10 19:34:49 -08:00
committed by GitHub
parent 6f7cd29fb5
commit adcdcaa4e4
3 changed files with 35 additions and 7 deletions

View File

@@ -58,6 +58,14 @@ namespace Content.Client.ContextMenu.UI
DebugTools.Assert(ParentElement.SubMenu == null);
ParentElement.SubMenu = this;
}
// ensure the menu-stack is properly updated when a pop-up looses focus or otherwise closes without going
// through the menu presenter.
OnPopupHide += () =>
{
if (ParentElement != null)
_presenter.CloseSubMenus(ParentElement.ParentMenu);
};
}
protected override void Dispose(bool disposing)