diff --git a/TGS.ControlPanel/TestMergeManager.cs b/TGS.ControlPanel/TestMergeManager.cs
index f609142431..115151a459 100644
--- a/TGS.ControlPanel/TestMergeManager.cs
+++ b/TGS.ControlPanel/TestMergeManager.cs
@@ -48,6 +48,31 @@ namespace TGS.ControlPanel
currentInterface = interfaceToUse;
client = clientToUse;
Load += PullRequestManager_Load;
+ PullRequestListBox.ItemCheck += PullRequestListBox_ItemCheck;
+ }
+
+ ///
+ /// Called when an item in is checked or unchecked. Unchecks opposing PRs
+ ///
+ /// The sender of the event
+ /// The
+ void PullRequestListBox_ItemCheck(object sender, ItemCheckEventArgs e)
+ {
+ if (e.NewValue != CheckState.Checked)
+ return;
+ //let's uncheck the opposing PR# if this is one of the outdated/updated testmerge
+ var item = (string)PullRequestListBox.Items[e.Index];
+ var prefix = item.Split(' ')[0];
+
+ for (var I = 0; I < PullRequestListBox.Items.Count; ++I)
+ {
+ var S = (string)PullRequestListBox.Items[I];
+ if (S.Split(' ')[0] == prefix && S != item)
+ {
+ PullRequestListBox.SetItemChecked(I, false);
+ break;
+ }
+ }
}
///
@@ -305,11 +330,6 @@ namespace TGS.ControlPanel
LoadPullRequests();
}
- bool PullRequestsStringsListContainsPRNumber(CheckedListBox.ObjectCollection items, int PRNumber)
- {
- return false;
- }
-
///
/// Called when the is clicked. Adds the PR with the number in to or shows an error prompt if it doesn't/already exists
///