From 4c2eca29cc42d8e180982df067c67f672f874749 Mon Sep 17 00:00:00 2001 From: Robert Date: Fri, 15 Mar 2024 23:41:00 +0100 Subject: [PATCH] Storage - Fix profile order not loading/saving --- src/Artemis.Core/Models/Profile/ProfileCategory.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Artemis.Core/Models/Profile/ProfileCategory.cs b/src/Artemis.Core/Models/Profile/ProfileCategory.cs index 1a5c6f269..19f0398a2 100644 --- a/src/Artemis.Core/Models/Profile/ProfileCategory.cs +++ b/src/Artemis.Core/Models/Profile/ProfileCategory.cs @@ -167,7 +167,7 @@ public class ProfileCategory : CorePropertyChanged, IStorageModel IsSuspended = Entity.IsSuspended; Order = Entity.Order; - ProfileConfigurations = new ReadOnlyCollection(Entity.ProfileConfigurations.Select(pc => new ProfileConfiguration(this, pc)).ToList()); + ProfileConfigurations = new ReadOnlyCollection(Entity.ProfileConfigurations.Select(pc => new ProfileConfiguration(this, pc)).OrderBy(pc => pc.Order).ToList()); } /// @@ -180,7 +180,10 @@ public class ProfileCategory : CorePropertyChanged, IStorageModel Entity.ProfileConfigurations.Clear(); foreach (ProfileConfiguration profileConfiguration in ProfileConfigurations) + { + profileConfiguration.Save(); Entity.ProfileConfigurations.Add(profileConfiguration.Entity); + } } #endregion