Minor fixes

This commit is contained in:
Kaphotics
2016-05-03 20:15:40 -07:00
parent 89b5d796c6
commit c2da72c424
2 changed files with 6 additions and 3 deletions

View File

@@ -488,7 +488,7 @@ private void InitializeComponent()
this.Controls.Add(this.NUD_Ability);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimumSize = new System.Drawing.Size(310, 290);
this.MinimumSize = new System.Drawing.Size(380, 343);
this.Name = "Gifts";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Gift Editor";

View File

@@ -106,15 +106,17 @@ private void changeIndex(object sender, EventArgs e)
{
if (LB_Gifts.SelectedIndex < 0)
return;
if (entry != -1)
saveEntry();
if (!loaded)
return;
if (entry != -1)
saveEntry();
entry = LB_Gifts.SelectedIndex;
loadEntry();
}
private void loadEntry()
{
bool oldloaded = loaded;
loaded = false;
CB_Species.SelectedIndex = GiftData[entry].Species;
CB_HeldItem.SelectedIndex = GiftData[entry].HeldItem;
NUD_Level.Value = GiftData[entry].Level;
@@ -129,6 +131,7 @@ private void loadEntry()
NUD_IV3.Value = GiftData[entry].IVs[3];
NUD_IV4.Value = GiftData[entry].IVs[4];
NUD_IV5.Value = GiftData[entry].IVs[5];
loaded |= oldloaded;
}
private void saveEntry()
{