Implemented version selection stuff.

This commit is contained in:
Andrew 2013-05-06 21:28:28 -05:00
parent fb0432bf0b
commit 2e62f6e8d8
3 changed files with 12 additions and 1 deletions

View File

@ -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());
}
}

View File

@ -106,3 +106,8 @@ void NewInstanceDialog::on_btnChangeVersion_clicked()
setSelectedVersion(version);
}
}
void NewInstanceDialog::on_instNameTextBox_textChanged(const QString &arg1)
{
updateDialogState();
}

View File

@ -46,6 +46,8 @@ public:
private slots:
void on_btnChangeVersion_clicked();
void on_instNameTextBox_textChanged(const QString &arg1);
private:
Ui::NewInstanceDialog *ui;