Fix Met tab startup binding

`ListControl._dataManager` is null until some event fires, which never happens until the Visible state is normally triggered by flipping to that tab.

The met tab Version/Location can skip Visibility changes on startup, resulting in never being initialized by the GUI framework, thus ignoring any calls to change SelectedValue. Really weird, but setting the BindingContext here forces it to create a `_dataManager` when setting a new `DataSource`.

Closes #4384
This commit is contained in:
Kurt 2024-11-11 15:11:47 -06:00
parent 5d4976303d
commit b0a2c7911e

View file

@ -104,7 +104,10 @@ public sealed partial class PKMEditor : UserControl, IMainEditor
CB_AlphaMastered,
];
foreach (var cb in cbs.Concat(Relearn))
{
cb.BindingContext = BindingContext;
cb.InitializeBinding();
}
IsInitialized = true;
}