[GUI] Simplify sector tag ordering in ImageConvertViewModel

This commit is contained in:
2025-10-27 00:35:05 +00:00
parent 4d59b13307
commit 0d5d8366f6

View File

@@ -384,7 +384,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
{ {
ProgressMaxValue += tracks.Count; ProgressMaxValue += tracks.Count;
foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.OrderBy(t => t)) foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Order())
{ {
switch(tag) switch(tag)
{ {
@@ -875,7 +875,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
Dictionary<byte, int> smallestPregapLbaPerTrack = new(); Dictionary<byte, int> smallestPregapLbaPerTrack = new();
foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Where(t => t == SectorTagType.CdTrackIsrc) foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Where(t => t == SectorTagType.CdTrackIsrc)
.OrderBy(t => t)) .Order())
{ {
foreach(Track track in inputOptical.Tracks) foreach(Track track in inputOptical.Tracks)
{ {
@@ -889,7 +889,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags
.Where(t => t == SectorTagType.CdTrackFlags) .Where(t => t == SectorTagType.CdTrackFlags)
.OrderBy(t => t)) .Order())
{ {
foreach(Track track in inputOptical.Tracks) foreach(Track track in inputOptical.Tracks)
{ {
@@ -1352,7 +1352,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
Progress2Value = Progress2MaxValue; Progress2Value = Progress2MaxValue;
}); });
foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.OrderBy(t => t) foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Order()
.TakeWhile(_ => useLong && !_cancel)) .TakeWhile(_ => useLong && !_cancel))
{ {
switch(tag) switch(tag)