From fe8f3aa08fa46ec361de435b4a15f51b18918544 Mon Sep 17 00:00:00 2001 From: Stefan Markovic Date: Wed, 20 Sep 2023 17:58:03 +0200 Subject: [PATCH] Sort variables in Applied variables --- .../EnvironmentVariables/ViewModels/MainViewModel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/EnvironmentVariables/EnvironmentVariables/ViewModels/MainViewModel.cs b/src/modules/EnvironmentVariables/EnvironmentVariables/ViewModels/MainViewModel.cs index cf86134bef..f2126f9978 100644 --- a/src/modules/EnvironmentVariables/EnvironmentVariables/ViewModels/MainViewModel.cs +++ b/src/modules/EnvironmentVariables/EnvironmentVariables/ViewModels/MainViewModel.cs @@ -114,10 +114,10 @@ namespace EnvironmentVariables.ViewModels var variables = new List(); if (AppliedProfile != null) { - variables = variables.Concat(AppliedProfile.Variables).ToList(); + variables = variables.Concat(AppliedProfile.Variables.OrderBy(x => x.Name)).ToList(); } - variables = variables.Concat(UserDefaultSet.Variables).Concat(SystemDefaultSet.Variables).ToList(); + variables = variables.Concat(UserDefaultSet.Variables.OrderBy(x => x.Name)).Concat(SystemDefaultSet.Variables.OrderBy(x => x.Name)).ToList(); variables = variables.GroupBy(x => x.Name).Select(y => y.First()).ToList(); AppliedVariables = new ObservableCollection(variables); }