Implemented version selection stuff.
This commit is contained in:
parent
fb0432bf0b
commit
2e62f6e8d8
@ -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());
|
||||
}
|
||||
}
|
||||
|
@ -106,3 +106,8 @@ void NewInstanceDialog::on_btnChangeVersion_clicked()
|
||||
setSelectedVersion(version);
|
||||
}
|
||||
}
|
||||
|
||||
void NewInstanceDialog::on_instNameTextBox_textChanged(const QString &arg1)
|
||||
{
|
||||
updateDialogState();
|
||||
}
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
private slots:
|
||||
void on_btnChangeVersion_clicked();
|
||||
|
||||
void on_instNameTextBox_textChanged(const QString &arg1);
|
||||
|
||||
private:
|
||||
Ui::NewInstanceDialog *ui;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user