From 3507ccaf50e22b68850f5b8a2072a56e218691f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 15 Apr 2015 03:12:57 +0200 Subject: [PATCH] GH-866 load instance profile on launch and from version page --- application/MainWindow.cpp | 6 ++++++ application/pages/VersionPage.cpp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 1f6387be..ff890d6e 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -1736,6 +1736,12 @@ void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session, QString launchScript; + if(!instance->reload()) + { + QMessageBox::critical(this, tr("Error"), tr("Couldn't load the instance profile.")); + return; + } + BaseProcess *proc = instance->prepareForLaunch(session); if (!proc) return; diff --git a/application/pages/VersionPage.cpp b/application/pages/VersionPage.cpp index c2380163..6b220017 100644 --- a/application/pages/VersionPage.cpp +++ b/application/pages/VersionPage.cpp @@ -62,6 +62,8 @@ VersionPage::VersionPage(OneSixInstance *inst, QWidget *parent) ui->setupUi(this); ui->tabWidget->tabBar()->hide(); + reloadMinecraftProfile(); + m_version = m_inst->getMinecraftProfile(); if (m_version) { @@ -119,7 +121,7 @@ bool VersionPage::reloadMinecraftProfile() { QMessageBox::critical( this, tr("Error"), - tr("Failed to load the version description file for reasons unknown.")); + tr("Couldn't load the instance profile.")); return false; } }