1
0
mirror of synced 2024-11-27 21:10:48 +01:00

Fixed sorting by Id

Sorting by id incorrectly sorted the music order page by alphabetical order instead of numerical order.
This commit is contained in:
Farewell_ 2024-03-21 14:45:59 +01:00
parent bd7ffd3371
commit 718ccd4774
2 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ using System.Drawing;
using System.Linq;
using System;
using TaikoSoundEditor.Collections;
using System.Text.RegularExpressions;
namespace TaikoSoundEditor.Commons.Controls
{
@ -39,7 +40,7 @@ namespace TaikoSoundEditor.Commons.Controls
else if (Config.MusicOrderSort == Config.MusicOrderSortValueId)
{
SongCards.Add(songCard);
SongCards.Sort((c1, c2) => c1.Id.CompareTo(c2.Id));
SongCards.Sort((c1, c2) => c1.MusicOrder.UniqueId.CompareTo(c2.MusicOrder.UniqueId));
}
else if (Config.MusicOrderSort == Config.MusicOrderSortValueGenre)
{

View File

@ -11,7 +11,7 @@ namespace TaikoSoundEditor.Commons.Controls
internal WordList WordList { get; }
public IMusicOrder MusicOrder { get; }
public string Id => $"{MusicOrder.UniqueId}.{MusicOrder.Id}";
public string Id => $"{MusicOrder.UniqueId}. {MusicOrder.Id}";
public string Title => WordList.GetBySong(MusicOrder.Id).JapaneseText;
public string Subtitle => WordList.GetBySongSub(MusicOrder.Id).JapaneseText;
public string Genre => MusicOrder.Genre.ToString();