mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
launcher: Instead of killing config writing due to no master files being selected, instead display a warning when Play is pressed.
This commit is contained in:
parent
fb462f1b1a
commit
43455129d0
1 changed files with 11 additions and 11 deletions
|
@ -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("<br><b>You do not have any master files selected.</b><br><br> \
|
||||
Please select one and try again.<br>"));
|
||||
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("<br><b>You do not have any master files selected.</b><br><br> \
|
||||
OpenMW will not start without a master file selected.<br>"));
|
||||
msgBox.exec();
|
||||
return;
|
||||
}
|
||||
|
||||
// Launch the game detached
|
||||
startProgram(QString("openmw"), true);
|
||||
qApp->quit();
|
||||
|
|
Loading…
Reference in a new issue