diff options
author | Andrew <forkk@forkk.net> | 2013-05-06 21:28:28 -0500 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-05-06 21:28:28 -0500 |
commit | 2e62f6e8d8aded1036f96835ebebd4d656c0fcc2 (patch) | |
tree | 44e2216f93e7906d026db1981b6f2008db6ecead /gui/mainwindow.cpp | |
parent | fb0432bf0bb5ef6216462467cbae6fbe03100dcd (diff) | |
download | MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar.gz MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar.lz MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar.xz MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.zip |
Implemented version selection stuff.
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r-- | gui/mainwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 96609531..22055b51 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -177,6 +177,7 @@ void MainWindow::on_actionAddInstance_triggered() if (error == InstanceLoader::NoError) { newInstance->setName(newInstDlg->instName()); + newInstance->setIntendedVersion(newInstDlg->selectedVersion()->descriptor()); instList.add(InstancePtr(newInstance)); } else @@ -418,5 +419,8 @@ void MainWindow::on_actionChangeInstMCVersion_triggered() Instance *inst = (Instance *)index.data(InstanceModel::InstancePointerRole).value<void *>(); VersionSelectDialog *vselect = new VersionSelectDialog(inst->versionList(), this); - vselect->exec(); + if (vselect->exec() && vselect->selectedVersion()) + { + inst->setIntendedVersion(vselect->selectedVersion()->descriptor()); + } } |