summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-15 03:12:57 +0200
committerPetr Mrázek <peterix@gmail.com>2015-04-15 03:12:57 +0200
commit3507ccaf50e22b68850f5b8a2072a56e218691f4 (patch)
tree3c75129bf486bbc8f10f4bedcf74b2914e0b1b31 /application
parent28aa8f342ebaf34655ed0c1dd59851adb224fc64 (diff)
downloadMultiMC-3507ccaf50e22b68850f5b8a2072a56e218691f4.tar
MultiMC-3507ccaf50e22b68850f5b8a2072a56e218691f4.tar.gz
MultiMC-3507ccaf50e22b68850f5b8a2072a56e218691f4.tar.lz
MultiMC-3507ccaf50e22b68850f5b8a2072a56e218691f4.tar.xz
MultiMC-3507ccaf50e22b68850f5b8a2072a56e218691f4.zip
GH-866 load instance profile on launch and from version page
Diffstat (limited to 'application')
-rw-r--r--application/MainWindow.cpp6
-rw-r--r--application/pages/VersionPage.cpp4
2 files changed, 9 insertions, 1 deletions
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;
}
}