mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-29 03:19:44 +00:00
Wizard: Only allow to select Morrowind.esm master files, display an error if Morrowind.bsa is missing
This commit is contained in:
parent
d47bd54bb5
commit
e7afbc74d8
@ -95,9 +95,9 @@ void Wizard::ExistingInstallationPage::on_browseButton_clicked()
|
||||
{
|
||||
QString selectedFile = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Select master file"),
|
||||
tr("Select Morrowind.esm (located in Data Files)"),
|
||||
QDir::currentPath(),
|
||||
QString(tr("Morrowind master file (*.esm)")),
|
||||
QString(tr("Morrowind master file (Morrowind.esm)")),
|
||||
nullptr,
|
||||
QFileDialog::DontResolveSymlinks);
|
||||
|
||||
@ -110,7 +110,18 @@ void Wizard::ExistingInstallationPage::on_browseButton_clicked()
|
||||
return;
|
||||
|
||||
if (!mWizard->findFiles(QLatin1String("Morrowind"), info.absolutePath()))
|
||||
return; // No valid Morrowind installation found
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setWindowTitle(tr("Error detecting Morrowind files"));
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||
msgBox.setText(QObject::tr(
|
||||
"<b>Morrowind.bsa</b> is missing!<br>\
|
||||
Make sure your Morrowind installation is complete."
|
||||
));
|
||||
msgBox.exec();
|
||||
return;
|
||||
}
|
||||
|
||||
QString path(QDir::toNativeSeparators(info.absolutePath()));
|
||||
QList<QListWidgetItem*> items = installationsList->findItems(path, Qt::MatchExactly);
|
||||
|
Loading…
Reference in New Issue
Block a user