From 27c72935f8a17761e9b18a74643e014cad3587d1 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 19 Apr 2022 15:07:14 +0200 Subject: fix: use size in bytes to sort by world size --- launcher/ui/pages/instance/WorldListPage.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'launcher/ui/pages/instance') 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 #include #include +#include #include "tools/MCEditTool.h" #include "FileSystem.h" @@ -92,6 +93,7 @@ WorldListPage::WorldListPage(BaseInstance *inst, std::shared_ptr 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); -- cgit