mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 06:34:19 +00:00
Update SAVEditor.cs
This commit is contained in:
parent
30d85c95a0
commit
a143c9a2ab
1 changed files with 3 additions and 1 deletions
|
@ -170,11 +170,13 @@ public partial class SAVEditor : UserControl, ISlotViewer<PictureBox>, ISaveFile
|
|||
|
||||
public int GetViewIndex(ISlotInfo slot)
|
||||
{
|
||||
if (GetCurrentDaycare() is not { })
|
||||
if (GetCurrentDaycare() is not { } dc)
|
||||
return -1;
|
||||
|
||||
for (int i = 0; i < SlotPictureBoxes.Count; i++)
|
||||
{
|
||||
if (dc.DaycareSlotCount == i)
|
||||
break;
|
||||
var data = GetSlotData(i);
|
||||
if (data.Equals(slot))
|
||||
return i;
|
||||
|
|
Loading…
Reference in a new issue