aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-10-04 09:41:49 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-10-04 09:41:49 +0300
commitac38585a2a9b1fdcd411b5d186b31eab3c67b0d2 (patch)
tree6f7cb5541a4f988dff6e289443b551c3aff74ddf /launcher/ui
parent3cba5adb5af0bac91f19805fbbc7a99611c6b5a5 (diff)
parentd186c34385df480988aab2a388c8889b9371c6c2 (diff)
downloadPrismLauncher-ac38585a2a9b1fdcd411b5d186b31eab3c67b0d2.tar.gz
PrismLauncher-ac38585a2a9b1fdcd411b5d186b31eab3c67b0d2.tar.bz2
PrismLauncher-ac38585a2a9b1fdcd411b5d186b31eab3c67b0d2.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into release_order
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/MainWindow.cpp2
-rw-r--r--launcher/ui/pages/instance/ModFolderPage.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index 64873ebb..1202c331 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -363,7 +363,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWi
// Shouldn't have to use lambdas here like this, but if I don't, the compiler throws a fit.
// Template hell sucks...
connect(APPLICATION->accounts().get(), &AccountList::defaultAccountChanged, [this] { defaultAccountChanged(); });
- connect(APPLICATION->accounts().get(), &AccountList::listChanged, [this] { repopulateAccountsMenu(); });
+ connect(APPLICATION->accounts().get(), &AccountList::listChanged, [this] { defaultAccountChanged(); });
// Show initial account
defaultAccountChanged();
diff --git a/launcher/ui/pages/instance/ModFolderPage.cpp b/launcher/ui/pages/instance/ModFolderPage.cpp
index 69c34daf..625d3793 100644
--- a/launcher/ui/pages/instance/ModFolderPage.cpp
+++ b/launcher/ui/pages/instance/ModFolderPage.cpp
@@ -206,6 +206,14 @@ void ModFolderPage::installMods()
void ModFolderPage::updateMods()
{
+ if (m_instance->typeName() != "Minecraft")
+ return; // this is a null instance or a legacy instance
+
+ auto profile = static_cast<MinecraftInstance*>(m_instance)->getPackProfile();
+ if (!profile->getModLoaders().has_value()) {
+ QMessageBox::critical(this, tr("Error"), tr("Please install a mod loader first!"));
+ return;
+ }
auto selection = m_filterModel->mapSelectionToSource(ui->treeView->selectionModel()->selection()).indexes();
auto mods_list = m_model->selectedMods(selection);