forked from mirror/openmw-tes3mp
launcher: Throw error if no data files are selected
This commit is contained in:
parent
fd25616cab
commit
fb462f1b1a
2 changed files with 12 additions and 0 deletions
|
@ -531,6 +531,17 @@ 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"));
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
inline QStringList getDataDirs() { return mDataDirs; }
|
||||
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
|
||||
inline QString getDataLocal() {return mDataLocal; }
|
||||
inline bool hasMaster() { return mSettings.count(QString("master")) > 0; }
|
||||
|
||||
QStringList values(const QString &key, const QStringList &defaultValues = QStringList());
|
||||
bool readFile(QTextStream &stream);
|
||||
|
|
Loading…
Reference in a new issue