Only allow main window box to change sav.currentbox

This commit is contained in:
Kurt 2018-11-20 23:53:17 -08:00
parent 0ebfb38717
commit 8f70aa0113
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,7 @@ namespace PKHeX.WinForms.Controls
public int BoxSlotCount { get; }
public SlotChangeManager M { get; set; }
public bool FlagIllegal { get; set; }
public bool CanSetCurrentBox { get; set; }
private const int SlotCount = 30;
public BoxEditor()
@ -219,7 +220,7 @@ namespace PKHeX.WinForms.Controls
private void GetBox(object sender, EventArgs e)
{
if (SAV.CurrentBox != CurrentBox)
if (SAV.CurrentBox != CurrentBox && CanSetCurrentBox)
SAV.CurrentBox = CurrentBox;
ResetSlots();
M?.RefreshHoverSlot(this);

View file

@ -167,6 +167,7 @@
// Box
//
this.Box.AllowDrop = true;
this.Box.CanSetCurrentBox = true;
this.Box.ControlsEnabled = true;
this.Box.ControlsVisible = true;
this.Box.CurrentBox = -1;