mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Only allow main window box to change sav.currentbox
This commit is contained in:
parent
0ebfb38717
commit
8f70aa0113
2 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue