Skip to content

Commit 47c9580

Browse files
committed
Merge #4495 Remove dependencies from changeset when skipping a change
2 parents 8807a31 + 371d74b commit 47c9580

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
1313
- [Core] Ensure encoding is UTF-8 when saving JSON (#4475, #4478 by: HebaruSan)
1414
- [GUI] Display release date in local time zone (#4488 by: HebaruSan)
1515
- [GUI] Fix freezing after startup with empty mod list (#4491, #4492 by: HebaruSan)
16+
- [GUI] Remove dependencies from changeset when skipping a change (#4495 by: HebaruSan)
1617

1718
### Internal
1819

GUI/Controls/Changeset.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ private void ChangesGrid_CellClick(object sender, DataGridViewCellEventArgs e)
8181
&& row.ConfirmUncheck())
8282
{
8383
(ChangesGrid.DataSource as BindingList<ChangesetRow>)?.Remove(row);
84-
changeset?.Remove(row.Change);
8584
OnRemoveItem?.Invoke(row.Change);
85+
changeset?.Remove(row.Change);
8686
}
8787
}
8888

GUI/Controls/ManageMods.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,18 @@ public void RemoveChangesetItem(ModChange change)
11211121
guiMod.SelectedMod = guiMod.InstalledMod?.Module;
11221122
switch (change.ChangeType)
11231123
{
1124+
case GUIModChangeType.Remove:
1125+
if (row.Cells[Installed.Index] is DataGridViewCheckBoxCell instCell)
1126+
{
1127+
instCell.Value = true;
1128+
}
1129+
break;
1130+
case GUIModChangeType.Install:
1131+
if (row.Cells[Installed.Index] is DataGridViewCheckBoxCell rmCell)
1132+
{
1133+
rmCell.Value = false;
1134+
}
1135+
break;
11241136
case GUIModChangeType.Replace:
11251137
if (row.Cells[ReplaceCol.Index] is DataGridViewCheckBoxCell checkCell)
11261138
{

0 commit comments

Comments
 (0)