GH-866 load instance profile on launch and from version page
This commit is contained in:
parent
28aa8f342e
commit
3507ccaf50
@ -1736,6 +1736,12 @@ void MainWindow::launchInstance(InstancePtr instance, AuthSessionPtr session,
|
|||||||
|
|
||||||
QString launchScript;
|
QString launchScript;
|
||||||
|
|
||||||
|
if(!instance->reload())
|
||||||
|
{
|
||||||
|
QMessageBox::critical(this, tr("Error"), tr("Couldn't load the instance profile."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
BaseProcess *proc = instance->prepareForLaunch(session);
|
BaseProcess *proc = instance->prepareForLaunch(session);
|
||||||
if (!proc)
|
if (!proc)
|
||||||
return;
|
return;
|
||||||
|
@ -62,6 +62,8 @@ VersionPage::VersionPage(OneSixInstance *inst, QWidget *parent)
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->tabWidget->tabBar()->hide();
|
ui->tabWidget->tabBar()->hide();
|
||||||
|
|
||||||
|
reloadMinecraftProfile();
|
||||||
|
|
||||||
m_version = m_inst->getMinecraftProfile();
|
m_version = m_inst->getMinecraftProfile();
|
||||||
if (m_version)
|
if (m_version)
|
||||||
{
|
{
|
||||||
@ -119,7 +121,7 @@ bool VersionPage::reloadMinecraftProfile()
|
|||||||
{
|
{
|
||||||
QMessageBox::critical(
|
QMessageBox::critical(
|
||||||
this, tr("Error"),
|
this, tr("Error"),
|
||||||
tr("Failed to load the version description file for reasons unknown."));
|
tr("Couldn't load the instance profile."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user