- Fixed a bug where Paradox Launcher wasn't being ticked as enabled when selected
This commit is contained in:
pointfeev 2022-03-05 21:14:42 -05:00
parent 7cae752787
commit 5b40924734
3 changed files with 10 additions and 4 deletions

View file

@ -5,7 +5,7 @@
<UseWindowsForms>True</UseWindowsForms> <UseWindowsForms>True</UseWindowsForms>
<ApplicationIcon>Resources\ini.ico</ApplicationIcon> <ApplicationIcon>Resources\ini.ico</ApplicationIcon>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract> <IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
<Version>3.1.0.0</Version> <Version>3.1.0.1</Version>
<PackageIcon>Resources\ini.ico</PackageIcon> <PackageIcon>Resources\ini.ico</PackageIcon>
<PackageIconUrl /> <PackageIconUrl />
<Description /> <Description />

View file

@ -81,7 +81,7 @@ internal class ProgramSelection
break; break;
} }
} }
Enabled = SelectedDlc.Any(); Enabled = SelectedDlc.Any() || ExtraDlc.Any();
} }
internal ProgramSelection() => All.Add(this); internal ProgramSelection() => All.Add(this);

View file

@ -196,7 +196,7 @@ internal partial class SelectForm : CustomForm
} }
selection ??= new(); selection ??= new();
selection.Enabled = allCheckBox.Checked || selection.SelectedDlc.Any(); selection.Enabled = allCheckBox.Checked || selection.SelectedDlc.Any() || selection.ExtraDlc.Any();
selection.Usable = true; selection.Usable = true;
selection.Id = appId; selection.Id = appId;
selection.Name = name; selection.Name = name;
@ -294,7 +294,7 @@ internal partial class SelectForm : CustomForm
} }
selection ??= new(); selection ??= new();
selection.Enabled = allCheckBox.Checked || selection.SelectedDlc.Any(); selection.Enabled = allCheckBox.Checked || selection.SelectedDlc.Any() || selection.ExtraDlc.Any();
selection.Usable = true; selection.Usable = true;
selection.Id = @namespace; selection.Id = @namespace;
selection.Name = name; selection.Name = name;
@ -472,6 +472,12 @@ internal partial class SelectForm : CustomForm
if (selection is not null) if (selection is not null)
selection.ToggleDlc(node.Name, node.Checked); selection.ToggleDlc(node.Name, node.Checked);
} }
else
{
ProgramSelection selection = ProgramSelection.FromId(node.Name);
if (selection is not null)
selection.Enabled = node.Checked;
}
} }
internal List<TreeNode> TreeNodes => GatherTreeNodes(selectionTreeView.Nodes); internal List<TreeNode> TreeNodes => GatherTreeNodes(selectionTreeView.Nodes);