more shenanigans

This commit is contained in:
pointfeev 2022-03-07 17:21:40 -05:00
parent df64448f55
commit 81f9be61e6

View file

@ -654,8 +654,6 @@ internal partial class SelectForm : CustomForm
selectionTreeView.NodeMouseClick += (sender, e) =>
{
int cmi = ++contextMenuIndex;
do { Thread.Sleep(0); } while (!Program.Canceled && nodeContextMenu.Visible);
if (cmi != contextMenuIndex || Program.Canceled) return;
TreeNode node = null;
try
{
@ -818,7 +816,9 @@ internal partial class SelectForm : CustomForm
AddToContextMenu(cmi, new ContextMenuItem("Open SteamDB", "SteamDB",
new EventHandler((sender, e) => Diagnostics.OpenUrlInInternetBrowser("https://steamdb.info/app/" + id))));
}
if (selection is not null && selection.IsSteam)
if (selection is not null)
{
if (selection.IsSteam)
{
AddToContextMenu(cmi, new ContextMenuItem("Open Steam Store", "Steam Store",
new EventHandler((sender, e) => Diagnostics.OpenUrlInInternetBrowser(selection.ProductUrl))));
@ -834,6 +834,7 @@ internal partial class SelectForm : CustomForm
new EventHandler((sender, e) => Diagnostics.OpenUrlInInternetBrowser(selection.ProductUrl))));
}
}
}
if (cmi != contextMenuIndex) return;
nodeContextMenu.Show(selectionTreeView, e.Location);
};