From c16e24be57ee7dbecdabb7b96dc5a07ef687100c Mon Sep 17 00:00:00 2001 From: pointfeev Date: Mon, 22 Nov 2021 02:42:45 -0500 Subject: [PATCH] fix reselection consistency --- CreamInstaller/Forms/SelectForm.cs | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/CreamInstaller/Forms/SelectForm.cs b/CreamInstaller/Forms/SelectForm.cs index d7a38f4..0359ec0 100644 --- a/CreamInstaller/Forms/SelectForm.cs +++ b/CreamInstaller/Forms/SelectForm.cs @@ -416,12 +416,7 @@ namespace CreamInstaller if (ProgramSelection.All.Count > 0) { foreach (ProgramSelection selection in ProgramSelection.AllSafeEnabled) - { - if (!Program.IsProgramRunningDialog(this, selection)) - { - return; - } - } + if (!Program.IsProgramRunningDialog(this, selection)) return; if (ParadoxLauncherDlcDialog(this)) return; Hide(); InstallForm installForm = new(this); @@ -429,13 +424,8 @@ namespace CreamInstaller if (installForm.Reselecting) { foreach (TreeNode treeNode in treeNodes) - { - if (!(treeNode.Parent is null)) - { - treeNode.Checked = !treeNode.Checked; - treeNode.Checked = !treeNode.Checked; // to fire checked event - } - } + if (!(treeNode.Parent is null) || treeNode.Text == "Paradox Launcher") + OnTreeViewNodeCheckedChanged(null, new(treeNode, TreeViewAction.ByMouse)); int X = installForm.Location.X + installForm.Size.Width / 2 - Size.Width / 2; int Y = installForm.Location.Y + installForm.Size.Height / 2 - Size.Height / 2; Location = new(X, Y);