diff options
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/instanceview/InstanceDelegate.cpp | 2 | ||||
-rw-r--r-- | launcher/ui/pages/instance/WorldListPage.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/launcher/ui/instanceview/InstanceDelegate.cpp b/launcher/ui/instanceview/InstanceDelegate.cpp index 22ff78cd..b446e39d 100644 --- a/launcher/ui/instanceview/InstanceDelegate.cpp +++ b/launcher/ui/instanceview/InstanceDelegate.cpp @@ -364,7 +364,7 @@ public: { QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); auto key = keyEvent->key(); - if (key == Qt::Key_Return || key == Qt::Key_Enter) + if ((key == Qt::Key_Return || key == Qt::Key_Enter) && eventType == QEvent::KeyPress) { emit editingDone(); return true; 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); |