summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-05-06 21:28:28 -0500
committerAndrew <forkk@forkk.net>2013-05-06 21:28:28 -0500
commit2e62f6e8d8aded1036f96835ebebd4d656c0fcc2 (patch)
tree44e2216f93e7906d026db1981b6f2008db6ecead
parentfb0432bf0bb5ef6216462467cbae6fbe03100dcd (diff)
downloadMultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar
MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar.gz
MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar.lz
MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.tar.xz
MultiMC-2e62f6e8d8aded1036f96835ebebd4d656c0fcc2.zip
Implemented version selection stuff.
-rw-r--r--gui/mainwindow.cpp6
-rw-r--r--gui/newinstancedialog.cpp5
-rw-r--r--gui/newinstancedialog.h2
3 files changed, 12 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());
+ }
}
diff --git a/gui/newinstancedialog.cpp b/gui/newinstancedialog.cpp
index 2034664d..ccdea063 100644
--- a/gui/newinstancedialog.cpp
+++ b/gui/newinstancedialog.cpp
@@ -106,3 +106,8 @@ void NewInstanceDialog::on_btnChangeVersion_clicked()
setSelectedVersion(version);
}
}
+
+void NewInstanceDialog::on_instNameTextBox_textChanged(const QString &arg1)
+{
+ updateDialogState();
+}
diff --git a/gui/newinstancedialog.h b/gui/newinstancedialog.h
index ea730b3c..1970e37a 100644
--- a/gui/newinstancedialog.h
+++ b/gui/newinstancedialog.h
@@ -46,6 +46,8 @@ public:
private slots:
void on_btnChangeVersion_clicked();
+ void on_instNameTextBox_textChanged(const QString &arg1);
+
private:
Ui::NewInstanceDialog *ui;