summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-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;