diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index c5f2f311d9..e81f72ba67 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -718,6 +718,9 @@ namespace Content.Client.Lobby.UI PreviewDummy = _controller.LoadProfileEntity(Profile, JobOverride, ShowClothes.Pressed); SpriteView.SetEntity(PreviewDummy); _entManager.System().SetEntityName(PreviewDummy, Profile.Name); + + // Check and set the dirty flag to enable the save/reset buttons as appropriate. + SetDirty(); } /// @@ -778,6 +781,9 @@ namespace Content.Client.Lobby.UI return; _entManager.System().LoadProfile(PreviewDummy, Profile); + + // Check and set the dirty flag to enable the save/reset buttons as appropriate. + SetDirty(); } private void OnSpeciesInfoButtonPressed(BaseButton.ButtonEventArgs args) @@ -1014,7 +1020,6 @@ namespace Content.Client.Lobby.UI roleLoadout.AddLoadout(loadoutGroup, loadoutProto, _prototypeManager); _loadoutWindow.RefreshLoadouts(roleLoadout, session, collection); Profile = Profile?.WithLoadout(roleLoadout); - SetDirty(); ReloadPreview(); }; @@ -1023,7 +1028,6 @@ namespace Content.Client.Lobby.UI roleLoadout.RemoveLoadout(loadoutGroup, loadoutProto, _prototypeManager); _loadoutWindow.RefreshLoadouts(roleLoadout, session, collection); Profile = Profile?.WithLoadout(roleLoadout); - SetDirty(); ReloadPreview(); }; @@ -1033,7 +1037,6 @@ namespace Content.Client.Lobby.UI _loadoutWindow.OnClose += () => { JobOverride = null; - SetDirty(); ReloadPreview(); }; @@ -1058,7 +1061,6 @@ namespace Content.Client.Lobby.UI return; Profile = Profile.WithCharacterAppearance(Profile.Appearance.WithMarkings(markings.GetForwardEnumerator().ToList())); - SetDirty(); ReloadProfilePreview(); } @@ -1126,7 +1128,6 @@ namespace Content.Client.Lobby.UI } } - SetDirty(); ReloadProfilePreview(); } @@ -1157,7 +1158,6 @@ namespace Content.Client.Lobby.UI { Profile = Profile?.WithAge(newAge); ReloadPreview(); - SetDirty(); } private void SetSex(Sex newSex) @@ -1180,14 +1180,12 @@ namespace Content.Client.Lobby.UI UpdateGenderControls(); Markings.SetSex(newSex); ReloadPreview(); - SetDirty(); } private void SetGender(Gender newGender) { Profile = Profile?.WithGender(newGender); ReloadPreview(); - SetDirty(); } private void SetSpecies(string newSpecies) @@ -1201,7 +1199,6 @@ namespace Content.Client.Lobby.UI RefreshLoadouts(); UpdateSexControls(); // update sex for new species UpdateSpeciesGuidebookIcon(); - SetDirty(); ReloadPreview(); }