Config: Add 'required' option to scales
All checks were successful
Test / Run tests (push) Successful in 4m3s

This commit is contained in:
2024-05-13 11:33:27 +02:00
parent f95f0f0ef3
commit 81e18ac553
2 changed files with 9 additions and 3 deletions

View File

@ -159,7 +159,9 @@ namespace Elwig {
list.Add(Scale.FromConfig(s));
} catch (Exception e) {
list.Add(new InvalidScale(s.Id));
MessageBox.Show($"Unable to create scale {s.Id}:\n\n{e.Message}", "Scale Error", MessageBoxButton.OK, MessageBoxImage.Error);
if (s.Required)
MessageBox.Show($"Unable to create scale {s.Id}:\n\n{e.Message}", "Scale Error",
MessageBoxButton.OK, MessageBoxImage.Error);
}
}
Scales = list;