From b5834dabdb12a9c63d4b676fb906ee01896a372a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 28 Mar 2022 20:43:23 +0900 Subject: [PATCH] Fix skin editor not exiting correctly when using the menu Closes https://github.com/ppy/osu/issues/17489. --- osu.Game/Skinning/Editor/SkinEditor.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Skinning/Editor/SkinEditor.cs b/osu.Game/Skinning/Editor/SkinEditor.cs index 4cc7e0bcdb..7bf4e94662 100644 --- a/osu.Game/Skinning/Editor/SkinEditor.cs +++ b/osu.Game/Skinning/Editor/SkinEditor.cs @@ -42,6 +42,9 @@ namespace osu.Game.Skinning.Editor [Resolved] private OsuColour colours { get; set; } + [Resolved(canBeNull: true)] + private SkinEditorOverlay skinEditorOverlay { get; set; } + [Cached] private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue); @@ -107,7 +110,7 @@ namespace osu.Game.Skinning.Editor new EditorMenuItem("Save", MenuItemType.Standard, Save), new EditorMenuItem("Revert to default", MenuItemType.Destructive, revert), new EditorMenuItemSpacer(), - new EditorMenuItem("Exit", MenuItemType.Standard, Hide), + new EditorMenuItem("Exit", MenuItemType.Standard, () => skinEditorOverlay?.Hide()), }, }, }