Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CustomizePlus/Profiles/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ public void AddTemporaryProfile(Profile profile, Actor actor)
profile.Enabled = true;
profile.ProfileType = ProfileType.Temporary;
profile.Priority = int.MaxValue; //Make sure temporary profile is always at max priority
profile.Index = Profiles.Count;

var permanentIdentifier = identifier.CreatePermanent();
profile.Characters.Clear();
Expand All @@ -453,6 +452,7 @@ public void AddTemporaryProfile(Profile profile, Actor actor)
DeleteProfile(existingProfile);
}

profile.Index = Profiles.Count; // capture index *after* potential DeleteProfile() above
Profiles.Add(profile);

_logger.Debug($"Added temporary profile for {permanentIdentifier}");
Expand Down
Loading