From a45bfe6faaacaf6137289c124ddcae0c6d72f625 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Wed, 6 Apr 2022 18:25:22 -0500 Subject: [PATCH] Show dependencies of upgrading mods in change set --- GUI/Controls/Changeset.cs | 8 +++----- GUI/Model/ModList.cs | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GUI/Controls/Changeset.cs b/GUI/Controls/Changeset.cs index 3d70dd7153..6511bda499 100644 --- a/GUI/Controls/Changeset.cs +++ b/GUI/Controls/Changeset.cs @@ -20,19 +20,17 @@ public void LoadChangeset(List changes, List AlertLabels ChangesListView.Items.Clear(); if (changes != null) { - // We're going to split our change-set into two parts: updated/removed mods, - // and everything else (which right now is replacing and installing mods, but we may have + // We're going to split our change-set into two parts: removed mods, + // and everything else (right now, replacing, upgrading, and installing mods, but we may have // other types in the future). sortedChangeSet.Clear(); sortedChangeSet.AddRange(changes.Where(change => change.ChangeType == GUIModChangeType.Remove)); - sortedChangeSet.AddRange(changes.Where(change => change.ChangeType == GUIModChangeType.Update)); // Now make our list more human-friendly (dependencies for a mod are listed directly // after it.) CreateSortedModList(changes - .Where(change => change.ChangeType != GUIModChangeType.Remove - && change.ChangeType != GUIModChangeType.Update) + .Where(change => change.ChangeType != GUIModChangeType.Remove) .ToList()); ChangesListView.Items.AddRange(sortedChangeSet diff --git a/GUI/Model/ModList.cs b/GUI/Model/ModList.cs index 5dc80b76be..0ff1d61748 100644 --- a/GUI/Model/ModList.cs +++ b/GUI/Model/ModList.cs @@ -130,6 +130,8 @@ public IEnumerable ComputeChangeSetFromModList( case GUIModChangeType.None: break; case GUIModChangeType.Update: + modules_to_install.Add((change as ModUpgrade)?.targetMod ?? change.Mod); + break; case GUIModChangeType.Install: modules_to_install.Add(change.Mod); break;