1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 17:13:06 +08:00

Show non-skinnable screen placeholder at higher level

This commit is contained in:
Bartłomiej Dach 2023-03-04 13:49:10 +01:00
parent 49e298e304
commit d233f3a3ab
No known key found for this signature in database

View File

@ -304,7 +304,8 @@ namespace osu.Game.Overlays.SkinEditor
changeHandler?.Dispose();
// Immediately clear the previous blueprint container to ensure it doesn't try to interact with the old target.
content?.Clear();
if (content?.Child is SkinBlueprintContainer)
content.Clear();
Scheduler.AddOnce(loadBlueprintContainer);
Scheduler.AddOnce(populateSettings);
@ -325,15 +326,15 @@ namespace osu.Game.Overlays.SkinEditor
SelectedComponents.Clear();
if (target.NewValue == null)
return;
Debug.Assert(content != null);
var skinComponentsContainer = getTarget(target.NewValue);
if (skinComponentsContainer == null)
if (target.NewValue == null || skinComponentsContainer == null)
{
content.Child = new NonSkinnableScreenPlaceholder();
return;
}
changeHandler = new SkinEditorChangeHandler(skinComponentsContainer);
changeHandler.CanUndo.BindValueChanged(v => undoMenuItem.Action.Disabled = !v.NewValue, true);