Save skin editor changes on forced exit

This commit is contained in:
Dean Herbert 2021-05-12 16:07:00 +09:00
parent 494a1b01a5
commit 9df08560b6
2 changed files with 4 additions and 2 deletions

View File

@ -108,7 +108,7 @@ namespace osu.Game.Skinning.Editor
{
Text = "Save Changes",
Width = 140,
Action = save,
Action = Save,
},
new DangerousTriangleButton
{
@ -192,7 +192,7 @@ namespace osu.Game.Skinning.Editor
}
}
private void save()
public void Save()
{
SkinnableElementTargetContainer[] targetContainers = targetScreen.ChildrenOfType<SkinnableElementTargetContainer>().ToArray();

View File

@ -92,8 +92,10 @@ namespace osu.Game.Skinning.Editor
/// </summary>
public void Reset()
{
skinEditor?.Save();
skinEditor?.Hide();
skinEditor?.Expire();
skinEditor = null;
}
}