Merge pull request #17593 from peppy/disable-random-skin-in-skin-editor

Disable ability to use random skin shortcut from within the skin editor
This commit is contained in:
Dan Balasescu 2022-04-01 16:03:50 +09:00 committed by GitHub
commit c294819128
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1061,6 +1061,12 @@ namespace osu.Game
return true;
case GlobalAction.RandomSkin:
// Don't allow random skin selection while in the skin editor.
// This is mainly to stop many "osu! default (modified)" skins being created via the SkinManager.EnsureMutableSkin() path.
// If people want this to work we can potentially avoid selecting default skins when the editor is open, or allow a maximum of one mutable skin somehow.
if (skinEditor.State.Value == Visibility.Visible)
return false;
SkinManager.SelectRandomSkin();
return true;
}