aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorKenneth Chew <kenneth.c0@protonmail.com>2022-04-05 20:27:31 -0400
committerKenneth Chew <kenneth.c0@protonmail.com>2022-04-15 15:37:07 -0400
commit2cb242e9b3174137b5ff97d3781ae253e8208843 (patch)
tree9177b783e37be4fcd00f2f52718bb1cb8ee0f914 /launcher
parent7aeccbb6b0e5f0af01c98d4dc5eb322888a45900 (diff)
downloadPrismLauncher-2cb242e9b3174137b5ff97d3781ae253e8208843.tar.gz
PrismLauncher-2cb242e9b3174137b5ff97d3781ae253e8208843.tar.bz2
PrismLauncher-2cb242e9b3174137b5ff97d3781ae253e8208843.zip
Show no loader selected message when add instance window first opens
This resolves an issue where the message only shows when selecting a mod loader and then selecting "None" again.
Diffstat (limited to 'launcher')
-rw-r--r--launcher/ui/pages/modplatform/VanillaPage.cpp1
-rw-r--r--launcher/ui/widgets/VersionSelectWidget.cpp6
-rw-r--r--launcher/ui/widgets/VersionSelectWidget.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/launcher/ui/pages/modplatform/VanillaPage.cpp b/launcher/ui/pages/modplatform/VanillaPage.cpp
index a99f107e..64015eb7 100644
--- a/launcher/ui/pages/modplatform/VanillaPage.cpp
+++ b/launcher/ui/pages/modplatform/VanillaPage.cpp
@@ -121,6 +121,7 @@ void VanillaPage::loaderFilterChanged()
ui->loaderVersionList->setExactFilter(BaseVersionList::ParentVersionRole, "AAA"); // empty list
// TODO: The below message does not show when the add instance window is first opened. This should be fixed.
ui->loaderVersionList->setEmptyString(tr("No mod loader is selected."));
+ ui->loaderVersionList->setEmptyMode(VersionListView::String);
return;
}
else if(ui->forgeFilter->isChecked())
diff --git a/launcher/ui/widgets/VersionSelectWidget.cpp b/launcher/ui/widgets/VersionSelectWidget.cpp
index 1209f118..cc4fc6a2 100644
--- a/launcher/ui/widgets/VersionSelectWidget.cpp
+++ b/launcher/ui/widgets/VersionSelectWidget.cpp
@@ -4,7 +4,6 @@
#include <QVBoxLayout>
#include <QHeaderView>
-#include "VersionListView.h"
#include "VersionProxyModel.h"
#include "ui/dialogs/CustomMessageBox.h"
@@ -57,6 +56,11 @@ void VersionSelectWidget::setEmptyErrorString(QString emptyErrorString)
listView->setEmptyErrorString(emptyErrorString);
}
+void VersionSelectWidget::setEmptyMode(VersionListView::EmptyMode mode)
+{
+ listView->setEmptyMode(mode);
+}
+
VersionSelectWidget::~VersionSelectWidget()
{
}
diff --git a/launcher/ui/widgets/VersionSelectWidget.h b/launcher/ui/widgets/VersionSelectWidget.h
index 0a649408..f56daa8a 100644
--- a/launcher/ui/widgets/VersionSelectWidget.h
+++ b/launcher/ui/widgets/VersionSelectWidget.h
@@ -18,6 +18,7 @@
#include <QWidget>
#include <QSortFilterProxyModel>
#include "BaseVersionList.h"
+#include "VersionListView.h"
class VersionProxyModel;
class VersionListView;
@@ -49,6 +50,7 @@ public:
void setFilter(BaseVersionList::ModelRoles role, Filter *filter);
void setEmptyString(QString emptyString);
void setEmptyErrorString(QString emptyErrorString);
+ void setEmptyMode(VersionListView::EmptyMode mode);
void setResizeOn(int column);
signals: