Skip to content

Commit

Permalink
Fix initial skin state being stored wrong to undo history
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Sep 30, 2024
1 parent 16e69b0 commit c37be49
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions osu.Game/Overlays/SkinEditor/SkinEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,17 +422,20 @@ private void skinChanged()
});

changeHandler?.Dispose();
changeHandler = null;

skins.EnsureMutableSkin();
Schedule(() =>
{
var targetContainer = getTarget(selectedTarget.Value);

var targetContainer = getTarget(selectedTarget.Value);
if (targetContainer != null)
changeHandler = new SkinEditorChangeHandler(targetContainer);

if (targetContainer != null)
changeHandler = new SkinEditorChangeHandler(targetContainer);
hasBegunMutating = true;
hasBegunMutating = true;

// Reload sidebar components.
selectedTarget.TriggerChange();
// Reload sidebar components.
selectedTarget.TriggerChange();
});
}

/// <summary>
Expand Down

0 comments on commit c37be49

Please sign in to comment.