1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00

Properly set parent of install game window

Now it won't magically disappear and confuse people who don't see it
popped up under the main window.
This commit is contained in:
Joshua Goins 2022-04-09 16:59:04 -04:00
parent 763a524766
commit 9210400e33

View file

@ -88,8 +88,12 @@ int main(int argc, char* argv[]) {
}
}
LauncherWindow w(c);
if(!parser.isSet(noguiOption)) {
w.show();
if(!QDir(c.getProfile(c.defaultProfileIndex).gamePath).exists()) {
auto messageBox = new QMessageBox(QMessageBox::Information, "No Game Found", "No game was found to be installed yet. Would you like to install FFXIV now?");
auto messageBox = new QMessageBox(QMessageBox::Information, "No Game Found", "No game was found to be installed yet. Would you like to install FFXIV now?", QMessageBox::NoButton, &w);
auto installButton = messageBox->addButton("Install Game", QMessageBox::HelpRole);
c.connect(installButton, &QPushButton::clicked, [&c, messageBox] {
@ -104,10 +108,6 @@ int main(int argc, char* argv[]) {
messageBox->show();
}
LauncherWindow w(c);
if(!parser.isSet(noguiOption)) {
w.show();
}
return app.exec();