Fix media type ordering

This commit is contained in:
Matt Nadareski
2023-10-10 01:52:47 -04:00
parent 1c73b1133f
commit fc97fe99e3
2 changed files with 2 additions and 1 deletions

View File

@@ -53,6 +53,7 @@
- Move MainViewModel to Core
- Remove LogOutputViewModel
- Consolidate some constants
- Fix media type ordering
### 2.6.6 (2023-10-04)

View File

@@ -681,7 +681,7 @@ namespace MPF.Core.UI.ViewModels
if (this.CurrentMediaType != null && index == -1)
VerboseLogLn($"Disc of type '{CurrentMediaType.LongName()}' found, but the current system does not support it!");
MediaTypes = Element<MediaType>.GenerateElements().Where(m => mediaTypeValues.Contains(m.Value)).ToList();
MediaTypes = mediaTypeValues.Select(m => new Element<MediaType>(m ?? MediaType.NONE)).ToList();
this.MediaTypeComboBoxEnabled = MediaTypes.Count > 1;
this.CurrentMediaType = (index > -1 ? MediaTypes[index] : MediaTypes[0]);
}