summaryrefslogtreecommitdiffstats
path: root/application/pages
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-12-09 01:30:23 +0100
committerPetr Mrázek <peterix@gmail.com>2017-12-09 01:30:23 +0100
commitef2cbe16e611da68f3cb529f87f4ecb3038af161 (patch)
tree7e9c6f9ab45ae90891e64cc245547c4b8cb79b66 /application/pages
parent57accb1cbb4a2deee050ded9f541faeacfbcc787 (diff)
downloadMultiMC-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.cpp19
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();