Fix block dump changing type on load

Loading the window and assigning the datasource fired the index changed event, changing the first block (array) to the (selected index of type), which was bool1. Exporting the save caused a bad block type write, yielding a bad size.

Only add the event after the constructor is finished, so that it only fires via user interaction.

Similarly reported but not exactly noticed in #2658
Closes #2663

Gonna update the release with a hotfix
This commit is contained in:
Kurt
2020-01-26 09:24:00 -08:00
parent 4ef48a4e79
commit 1ba271db50
2 changed files with 2 additions and 1 deletions

View File

@@ -265,7 +265,6 @@ private void InitializeComponent()
this.CB_TypeToggle.Size = new System.Drawing.Size(97, 21);
this.CB_TypeToggle.TabIndex = 12;
this.CB_TypeToggle.Visible = false;
this.CB_TypeToggle.SelectedIndexChanged += new System.EventHandler(this.CB_TypeToggle_SelectedIndexChanged);
//
// Tab_Compare
//

View File

@@ -37,6 +37,8 @@ public SAV_BlockDump8(SaveFile sav)
};
CB_TypeToggle.InitializeBinding();
CB_TypeToggle.DataSource = boolToggle;
CB_TypeToggle.SelectedIndexChanged += CB_TypeToggle_SelectedIndexChanged;
}
private void CB_Key_SelectedIndexChanged(object sender, EventArgs e)