From 43455129d0211eac758532047067e6c50ee2825a Mon Sep 17 00:00:00 2001 From: darkf Date: Mon, 17 Jun 2013 08:58:48 +0000 Subject: [PATCH] launcher: Instead of killing config writing due to no master files being selected, instead display a warning when Play is pressed. --- apps/launcher/maindialog.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp index a5fe8dcae..1fa6a6480 100644 --- a/apps/launcher/maindialog.cpp +++ b/apps/launcher/maindialog.cpp @@ -531,17 +531,6 @@ bool MainDialog::writeSettings() } } - if(!mGameSettings.hasMaster()) { - QMessageBox msgBox; - msgBox.setWindowTitle(tr("Error writing OpenMW configuration file")); - msgBox.setIcon(QMessageBox::Critical); - msgBox.setStandardButtons(QMessageBox::Ok); - msgBox.setText(tr("
You do not have any master files selected.

\ - Please select one and try again.
")); - msgBox.exec(); - return false; - } - // Game settings QFile file(userPath + QString("openmw.cfg")); @@ -624,6 +613,17 @@ void MainDialog::play() return; } + if(!mGameSettings.hasMaster()) { + QMessageBox msgBox; + msgBox.setWindowTitle(tr("No master file selected")); + msgBox.setIcon(QMessageBox::Warning); + msgBox.setStandardButtons(QMessageBox::Ok); + msgBox.setText(tr("
You do not have any master files selected.

\ + OpenMW will not start without a master file selected.
")); + msgBox.exec(); + return; + } + // Launch the game detached startProgram(QString("openmw"), true); qApp->quit();