From 35e6ed1a885c416cb766f6ea9235af3b699a5b10 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 4 Jan 2025 02:13:59 +0100 Subject: [PATCH] Qt: delete batch progress dialog after user closed it (as originally intended) --- rpcs3/rpcs3qt/game_list_frame.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index a5fc1f4525..02ca16716e 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -2366,19 +2366,17 @@ void game_list_frame::BatchActionBySerials(progress_dialog* pdlg, const std::set if ((*iterate_over_serial)(*index)) { QTimer::singleShot(1, this, *periodic_func); + return; } - else + + pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size)); + pdlg->setCancelButtonText(tr("OK")); + connect(pdlg, &progress_dialog::canceled, this, [pdlg](){ pdlg->deleteLater(); }); + QApplication::beep(); + + if (refresh_on_finish && index) { - pdlg->setLabelText(progressLabel.arg(*index).arg(serials_size)); - pdlg->setCancelButtonText(tr("OK")); - QApplication::beep(); - - if (refresh_on_finish && index) - { - Refresh(true); - } - - pdlg->deleteLater(); + Refresh(true); } };