diff options
author | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-19 16:33:02 +0100 |
---|---|---|
committer | Andrzej Rybczak <andrzej@rybczak.net> | 2020-12-19 16:33:02 +0100 |
commit | d724e06262f63a085b0b36015949baa1a4697d6a (patch) | |
tree | 1ce75cd299432dde969338ce6039dbd07127dda2 /src/screens/browser.cpp | |
parent | 3c7ce95aaa69c47fb06ddd1e37ac404fc2a4be0a (diff) |
Add `type` value of `browser_sort_mode` (set by default)
Diffstat (limited to 'src/screens/browser.cpp')
-rw-r--r-- | src/screens/browser.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/screens/browser.cpp b/src/screens/browser.cpp index 17d61012..7303f41c 100644 --- a/src/screens/browser.cpp +++ b/src/screens/browser.cpp @@ -500,8 +500,10 @@ void Browser::getDirectory(std::string directory) if (Config.browser_sort_mode != SortMode::None) { - std::sort(w.begin() + (is_root ? 0 : 1), w.end(), - LocaleBasedItemSorting(std::locale(), Config.ignore_leading_the, Config.browser_sort_mode)); + std::stable_sort( + w.begin() + (is_root ? 0 : 1), w.end(), + LocaleBasedItemSorting(std::locale(), Config.ignore_leading_the, + Config.browser_sort_mode)); } } @@ -681,8 +683,8 @@ void getLocalDirectoryRecursively(std::vector<MPD::Song> &songs, const std::stri if (Config.browser_sort_mode != SortMode::None) { - std::sort(songs.begin()+sort_offset, songs.end(), - LocaleBasedSorting(std::locale(), Config.ignore_leading_the) + std::stable_sort(songs.begin()+sort_offset, songs.end(), + LocaleBasedSorting(std::locale(), Config.ignore_leading_the) ); } } |