From 4ea870e282d6ac8941236e4f608c7d42cf12b2dc Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Sat, 5 Oct 2024 14:36:48 +0300 Subject: [PATCH] Fix --- .../LauncherManagerHandler.Modules.Orderer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bannerlord.LauncherManager/LauncherManagerHandler.Modules.Orderer.cs b/src/Bannerlord.LauncherManager/LauncherManagerHandler.Modules.Orderer.cs index e7f0482..8c3aedd 100644 --- a/src/Bannerlord.LauncherManager/LauncherManagerHandler.Modules.Orderer.cs +++ b/src/Bannerlord.LauncherManager/LauncherManagerHandler.Modules.Orderer.cs @@ -74,7 +74,7 @@ protected internal bool TryOrderByLoadOrderTW(IEnumerable loadOrder, Fun .Select(x => moduleViewModelLookup[x.Id]) .ToList(); - var existingLoadOrderValidationIssues = LoadOrderChecker.IsLoadOrderCorrect(existingOrderedModules).ToList(); + var existingLoadOrderValidationIssues = LoadOrderChecker.IsLoadOrderCorrect(existingOrderedModules.Where(x => moduleViewModelLookup[x.Id].IsSelected).ToList()).ToList(); if (!overwriteWhenFailure && existingLoadOrderValidationIssues.Count != 0) { issues = existingLoadOrderValidationIssues; @@ -99,7 +99,7 @@ protected internal bool TryOrderByLoadOrderTW(IEnumerable loadOrder, Fun SortHelper.ToggleModuleSelection(existingOrderedViewModels, moduleViewModelLookup, moduleVM); } - var providedLoadOrderValidationIssues = LoadOrderChecker.IsLoadOrderCorrect(originalOrderedModules).ToList(); + var providedLoadOrderValidationIssues = LoadOrderChecker.IsLoadOrderCorrect(originalOrderedModules.Where(x => moduleViewModelLookup[x.Id].IsSelected).ToList()).ToList(); issues = providedLoadOrderValidationIssues.Count > 0 ? providedLoadOrderValidationIssues : null; orderedModules = existingOrderedViewModels; var idx = 0;