diff options
author | Ezekiel Smith <ezekielsmith@protonmail.com> | 2022-04-20 08:32:38 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-20 08:32:38 +1000 |
commit | 405c44c9e13152dd30383fc09944a3853327cf9a (patch) | |
tree | 909610610abfd744ed8d97df5bad097daab48300 /launcher/ui | |
parent | c7563a5f7c00e389b2e2af699ea07d109bfb5ef3 (diff) | |
parent | 27c72935f8a17761e9b18a74643e014cad3587d1 (diff) | |
download | PrismLauncher-405c44c9e13152dd30383fc09944a3853327cf9a.tar.gz PrismLauncher-405c44c9e13152dd30383fc09944a3853327cf9a.tar.bz2 PrismLauncher-405c44c9e13152dd30383fc09944a3853327cf9a.zip |
Merge pull request #462 from Scrumplex/fix-world-size-sort
fix: use size in bytes to sort by world size
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/pages/instance/WorldListPage.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/launcher/ui/pages/instance/WorldListPage.cpp b/launcher/ui/pages/instance/WorldListPage.cpp index 650583a2..76725539 100644 --- a/launcher/ui/pages/instance/WorldListPage.cpp +++ b/launcher/ui/pages/instance/WorldListPage.cpp @@ -45,6 +45,7 @@ #include <QTreeView> #include <QInputDialog> #include <QProcess> +#include <Qt> #include "tools/MCEditTool.h" #include "FileSystem.h" @@ -92,6 +93,7 @@ WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr<WorldList> worl WorldListProxyModel * proxy = new WorldListProxyModel(this); proxy->setSortCaseSensitivity(Qt::CaseInsensitive); proxy->setSourceModel(m_worlds.get()); + proxy->setSortRole(Qt::UserRole); ui->worldTreeView->setSortingEnabled(true); ui->worldTreeView->setModel(proxy); ui->worldTreeView->installEventFilter(this); |