fix reselection consistency

This commit is contained in:
pointfeev 2021-11-22 02:42:45 -05:00
parent ba897cc40f
commit c16e24be57
No known key found for this signature in database
GPG key ID: AA14DC36C4D7D13C

View file

@ -416,12 +416,7 @@ namespace CreamInstaller
if (ProgramSelection.All.Count > 0) if (ProgramSelection.All.Count > 0)
{ {
foreach (ProgramSelection selection in ProgramSelection.AllSafeEnabled) foreach (ProgramSelection selection in ProgramSelection.AllSafeEnabled)
{ if (!Program.IsProgramRunningDialog(this, selection)) return;
if (!Program.IsProgramRunningDialog(this, selection))
{
return;
}
}
if (ParadoxLauncherDlcDialog(this)) return; if (ParadoxLauncherDlcDialog(this)) return;
Hide(); Hide();
InstallForm installForm = new(this); InstallForm installForm = new(this);
@ -429,13 +424,8 @@ namespace CreamInstaller
if (installForm.Reselecting) if (installForm.Reselecting)
{ {
foreach (TreeNode treeNode in treeNodes) foreach (TreeNode treeNode in treeNodes)
{ if (!(treeNode.Parent is null) || treeNode.Text == "Paradox Launcher")
if (!(treeNode.Parent is null)) OnTreeViewNodeCheckedChanged(null, new(treeNode, TreeViewAction.ByMouse));
{
treeNode.Checked = !treeNode.Checked;
treeNode.Checked = !treeNode.Checked; // to fire checked event
}
}
int X = installForm.Location.X + installForm.Size.Width / 2 - Size.Width / 2; int X = installForm.Location.X + installForm.Size.Width / 2 - Size.Width / 2;
int Y = installForm.Location.Y + installForm.Size.Height / 2 - Size.Height / 2; int Y = installForm.Location.Y + installForm.Size.Height / 2 - Size.Height / 2;
Location = new(X, Y); Location = new(X, Y);