Rearrange logiv for OneSix version change
This commit is contained in:
parent
4bf1cac8d8
commit
30d4f5981d
@ -1026,8 +1026,19 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
|
|||||||
VersionSelectDialog vselect(m_selectedInstance->versionList().get(),
|
VersionSelectDialog vselect(m_selectedInstance->versionList().get(),
|
||||||
tr("Change Minecraft version"), this);
|
tr("Change Minecraft version"), this);
|
||||||
vselect.setFilter(1, "OneSix");
|
vselect.setFilter(1, "OneSix");
|
||||||
if (vselect.exec() && vselect.selectedVersion())
|
if(!vselect.exec() || !vselect.selectedVersion())
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!MMC->accounts()->anyAccountIsValid())
|
||||||
{
|
{
|
||||||
|
CustomMessageBox::selectable(
|
||||||
|
this, tr("Error"),
|
||||||
|
tr("MultiMC cannot download Minecraft or update instances unless you have at least "
|
||||||
|
"one account added.\nPlease add your Mojang or Minecraft account."),
|
||||||
|
QMessageBox::Warning)->show();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_selectedInstance->versionIsCustom())
|
if (m_selectedInstance->versionIsCustom())
|
||||||
{
|
{
|
||||||
auto result = CustomMessageBox::selectable(
|
auto result = CustomMessageBox::selectable(
|
||||||
@ -1041,17 +1052,8 @@ void MainWindow::on_actionChangeInstMCVersion_triggered()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
|
m_selectedInstance->setIntendedVersionId(vselect.selectedVersion()->descriptor());
|
||||||
}
|
|
||||||
if (!MMC->accounts()->anyAccountIsValid())
|
auto updateTask = m_selectedInstance->doUpdate(false);
|
||||||
{
|
|
||||||
CustomMessageBox::selectable(
|
|
||||||
this, tr("Error"),
|
|
||||||
tr("MultiMC cannot download Minecraft or update instances unless you have at least "
|
|
||||||
"one account added.\nPlease add your Mojang or Minecraft account."),
|
|
||||||
QMessageBox::Warning)->show();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
auto updateTask = m_selectedInstance->doUpdate(false /*only_prepare*/);
|
|
||||||
if (!updateTask)
|
if (!updateTask)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user