diff options
Diffstat (limited to 'gui/mainwindow.cpp')
-rw-r--r-- | gui/mainwindow.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 4326431e..4bf38424 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -560,19 +560,15 @@ void MainWindow::on_actionChangeInstLWJGLVersion_triggered() void MainWindow::on_actionInstanceSettings_triggered() { - if (view->selectionModel()->selectedIndexes().count() < 1) - return; - - Instance *inst = selectedInstance(); - SettingsObject *s; - s = &inst->settings(); - InstanceSettings *settings = new InstanceSettings (this); - settings->setWindowTitle(QString("Instance settings")); - settings->loadSettings(s); - if (settings->exec()) { - settings->applySettings(s); - } - delete settings; + if (view->selectionModel()->selectedIndexes().count() < 1) + return; + + Instance *inst = selectedInstance(); + SettingsObject *s; + s = &inst->settings(); + InstanceSettings settings(s, this); + settings.setWindowTitle(QString("Instance settings")); + settings.exec(); } void MainWindow::instanceChanged(QModelIndex idx) { |