Fix clickLegality calling

existing logic put mnuLLegality back into mnuL, causing the getSlot call
to return -1 (not from a box/party slot, ie read from tabs).

new logic should have the intended behavior
This commit is contained in:
Kurt 2017-01-28 15:20:11 -08:00
parent 340b57ee60
commit 5cc8d1de5c

View File

@ -129,15 +129,18 @@ public Main()
{
c.Opening += (sender, e) =>
{
var items = ((ContextMenuStrip)sender).Items;
if (ModifierKeys == Keys.Control)
((ContextMenuStrip)sender).Items.Add(mnuLLegality);
};
c.Closing += (sender, e) =>
{
if (((ContextMenuStrip)sender).Items.Contains(mnuLLegality))
mnuL.Items.Add(mnuLLegality);
items.Add(mnuLLegality);
else if (items.Contains(mnuLLegality))
items.Remove(mnuLLegality);
};
}
mnuL.Opening += (sender, e) =>
{
if (mnuL.Items[0] != mnuLLegality)
mnuL.Items.Insert(0, mnuLLegality);
};
// Load WC6 folder to legality
refreshWC6DB();