BaseDataWindow: fix SeasonList Enabling/Disabling
This commit is contained in:
@ -19,6 +19,7 @@ namespace Elwig.Windows {
|
||||
private bool _modUpdate = false;
|
||||
|
||||
private void ModifiersInitEditing() {
|
||||
SeasonList.IsEnabled = false;
|
||||
var year = (SeasonList.SelectedItem as Season)?.Year;
|
||||
_modList = new(Context.Modifiers.Where(m => m.Year == year).OrderBy(m => m.Ordering).ToList());
|
||||
_mods = _modList.ToDictionary(m => m.ModId, m => (string?)m.ModId);
|
||||
@ -39,6 +40,7 @@ namespace Elwig.Windows {
|
||||
SeasonModifierDownButton.IsEnabled = false;
|
||||
SeasonModifierAddButton.IsEnabled = false;
|
||||
SeasonModifierDeleteButton.IsEnabled = false;
|
||||
SeasonList.IsEnabled = true;
|
||||
}
|
||||
|
||||
private async Task ModifiersSave() {
|
||||
|
@ -19,7 +19,6 @@ namespace Elwig.Windows {
|
||||
private bool _attrUpdate = false;
|
||||
|
||||
private void WineAttributesInitEditing() {
|
||||
SeasonList.IsEnabled = false;
|
||||
_attrList = new(Context.WineAttributes.OrderBy(a => a.Name).ToList());
|
||||
_attrs = _attrList.ToDictionary(a => a.AttrId, a => (string?)a.AttrId);
|
||||
_attrIds = _attrList.ToDictionary(a => a, a => a.AttrId);
|
||||
@ -36,7 +35,6 @@ namespace Elwig.Windows {
|
||||
|
||||
WineAttributeAddButton.IsEnabled = false;
|
||||
WineAttributeDeleteButton.IsEnabled = false;
|
||||
SeasonList.IsEnabled = true;
|
||||
}
|
||||
|
||||
private async Task WineAttributesSave() {
|
||||
|
Reference in New Issue
Block a user