diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-12-09 01:30:23 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-12-09 01:30:23 +0100 |
commit | ef2cbe16e611da68f3cb529f87f4ecb3038af161 (patch) | |
tree | 7e9c6f9ab45ae90891e64cc245547c4b8cb79b66 /application/pages | |
parent | 57accb1cbb4a2deee050ded9f541faeacfbcc787 (diff) | |
download | MultiMC-ef2cbe16e611da68f3cb529f87f4ecb3038af161.tar MultiMC-ef2cbe16e611da68f3cb529f87f4ecb3038af161.tar.gz MultiMC-ef2cbe16e611da68f3cb529f87f4ecb3038af161.tar.lz MultiMC-ef2cbe16e611da68f3cb529f87f4ecb3038af161.tar.xz MultiMC-ef2cbe16e611da68f3cb529f87f4ecb3038af161.zip |
NOISSUE when there is a version added already, preselect it in the version select dialog
Diffstat (limited to 'application/pages')
-rw-r--r-- | application/pages/VersionPage.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/application/pages/VersionPage.cpp b/application/pages/VersionPage.cpp index 632c3734..a4abcd60 100644 --- a/application/pages/VersionPage.cpp +++ b/application/pages/VersionPage.cpp @@ -315,6 +315,11 @@ void VersionPage::on_changeVersionBtn_clicked() return; } VersionSelectDialog vselect(list.get(), tr("Change %1 version").arg(name), this); + auto currentVersion = patch->getVersion(); + if(!currentVersion.isEmpty()) + { + vselect.setCurrentVersion(currentVersion); + } if (!vselect.exec() || !vselect.selectedVersion()) return; @@ -379,6 +384,13 @@ void VersionPage::on_forgeBtn_clicked() vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_profile->getComponentVersion("net.minecraft")); vselect.setEmptyString(tr("No Forge versions are currently available for Minecraft ") + m_profile->getComponentVersion("net.minecraft")); vselect.setEmptyErrorString(tr("Couldn't load or download the Forge version lists!")); + + auto currentVersion = m_profile->getComponentVersion("net.minecraftforge"); + if(!currentVersion.isEmpty()) + { + vselect.setCurrentVersion(currentVersion); + } + if (vselect.exec() && vselect.selectedVersion()) { auto vsn = vselect.selectedVersion(); @@ -439,6 +451,13 @@ void VersionPage::on_liteloaderBtn_clicked() vselect.setExactFilter(BaseVersionList::ParentVersionRole, m_profile->getComponentVersion("net.minecraft")); vselect.setEmptyString(tr("No LiteLoader versions are currently available for Minecraft ") + m_profile->getComponentVersion("net.minecraft")); vselect.setEmptyErrorString(tr("Couldn't load or download the LiteLoader version lists!")); + + auto currentVersion = m_profile->getComponentVersion("com.mumfrey.liteloader"); + if(!currentVersion.isEmpty()) + { + vselect.setCurrentVersion(currentVersion); + } + if (vselect.exec() && vselect.selectedVersion()) { auto vsn = vselect.selectedVersion(); |