From 9210400e33c4ed80853ea19bcb0a0fc78de570ed Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sat, 9 Apr 2022 16:59:04 -0400 Subject: [PATCH] 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. --- src/main.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 0ac6ee6..f5475cb 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -88,26 +88,26 @@ int main(int argc, char* argv[]) { } } - 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 installButton = messageBox->addButton("Install Game", QMessageBox::HelpRole); - c.connect(installButton, &QPushButton::clicked, [&c, messageBox] { - installGame(c, [messageBox, &c] { - c.readGameVersion(); - - messageBox->close(); - }); - }); - - messageBox->addButton(QMessageBox::StandardButton::No); - - messageBox->show(); - } - 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?", QMessageBox::NoButton, &w); + + auto installButton = messageBox->addButton("Install Game", QMessageBox::HelpRole); + c.connect(installButton, &QPushButton::clicked, [&c, messageBox] { + installGame(c, [messageBox, &c] { + c.readGameVersion(); + + messageBox->close(); + }); + }); + + messageBox->addButton(QMessageBox::StandardButton::No); + + messageBox->show(); + } } return app.exec();