diff options
author | flow <flowlnlnln@gmail.com> | 2022-10-13 13:49:06 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-10-13 13:49:06 -0300 |
commit | f26be005716818b643a0c8b1373dbe83e4cdcfbf (patch) | |
tree | 68e7955f4dc13f0c393b282efad9f98c44dcb57d /launcher/ui/dialogs | |
parent | 83654a193e8856e00bcdbe4f87d209e52c380a62 (diff) | |
download | PrismLauncher-f26be005716818b643a0c8b1373dbe83e4cdcfbf.tar.gz PrismLauncher-f26be005716818b643a0c8b1373dbe83e4cdcfbf.tar.bz2 PrismLauncher-f26be005716818b643a0c8b1373dbe83e4cdcfbf.zip |
fix: abort search if we're already trying to download a pack
Meaning we don't have to wait for the searches to finish in the
background to finally start the modpack download, when we have already
selected it -_-
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/NewInstanceDialog.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/launcher/ui/dialogs/NewInstanceDialog.cpp b/launcher/ui/dialogs/NewInstanceDialog.cpp index d203795a..df182f09 100644 --- a/launcher/ui/dialogs/NewInstanceDialog.cpp +++ b/launcher/ui/dialogs/NewInstanceDialog.cpp @@ -139,6 +139,10 @@ NewInstanceDialog::NewInstanceDialog(const QString & initialGroup, const QString void NewInstanceDialog::reject() { APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64()); + + // This is just so that the pages get the close() call and can react to it, if needed. + m_container->prepareToClose(); + QDialog::reject(); } @@ -146,6 +150,10 @@ void NewInstanceDialog::accept() { APPLICATION->settings()->set("NewInstanceGeometry", saveGeometry().toBase64()); importIconNow(); + + // This is just so that the pages get the close() call and can react to it, if needed. + m_container->prepareToClose(); + QDialog::accept(); } |