1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

Fix silly sorting mistakes

This commit is contained in:
Alex Amadori 2017-02-18 15:56:29 +01:00
parent d92382c1aa
commit f48c83b787
2 changed files with 14 additions and 11 deletions

View File

@ -43,19 +43,19 @@ namespace osu.Desktop.VisualTests.Tests
db.Import(sets);
}
OnArtist = () => SongSelect.Filter.Sort = FilterControl.SortMode.Artist;
OnTitle = () => SongSelect.Filter.Sort = FilterControl.SortMode.Title;
OnAuthor = () => SongSelect.Filter.Sort = FilterControl.SortMode.Author;
OnDifficulty = () => SongSelect.Filter.Sort = FilterControl.SortMode.Difficulty;
OnArtist = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Artist; };
OnTitle = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Title; };
OnAuthor = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Author; };
OnDifficulty = () => { SongSelect.Filter.Sort = FilterControl.SortMode.Difficulty; };
AddButton(@"Sort by Artist", OnArtist);
AddButton(@"Sort by Artist", OnTitle);
AddButton(@"Sort by Artist", OnAuthor);
AddButton(@"Sort by Artist", OnDifficulty);
AddButton(@"Sort by Title", OnTitle);
AddButton(@"Sort by Author", OnAuthor);
AddButton(@"Sort by Difficulty", OnDifficulty);
Add(new PlaySongSelect());
Add(SongSelect);
}
protected override void Dispose(bool isDisposing)
{
if (oldDb != null)

View File

@ -25,8 +25,11 @@ namespace osu.Game.Screens.Select
public SortMode Sort {
get { return sort; }
set {
sort = value;
FilterChanged?.Invoke();
if (sort != value)
{
sort = value;
FilterChanged?.Invoke();
}
}
}