From fc97fe99e342d8592afb0770c0d81556cbdcdcb4 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 10 Oct 2023 01:52:47 -0400 Subject: [PATCH] Fix media type ordering --- CHANGELIST.md | 1 + MPF.Core/UI/ViewModels/MainViewModel.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 4034d2c9..f5338e38 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -53,6 +53,7 @@ - Move MainViewModel to Core - Remove LogOutputViewModel - Consolidate some constants +- Fix media type ordering ### 2.6.6 (2023-10-04) diff --git a/MPF.Core/UI/ViewModels/MainViewModel.cs b/MPF.Core/UI/ViewModels/MainViewModel.cs index f0ef9c04..8837a221 100644 --- a/MPF.Core/UI/ViewModels/MainViewModel.cs +++ b/MPF.Core/UI/ViewModels/MainViewModel.cs @@ -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.GenerateElements().Where(m => mediaTypeValues.Contains(m.Value)).ToList(); + MediaTypes = mediaTypeValues.Select(m => new Element(m ?? MediaType.NONE)).ToList(); this.MediaTypeComboBoxEnabled = MediaTypes.Count > 1; this.CurrentMediaType = (index > -1 ? MediaTypes[index] : MediaTypes[0]); }