From 8308dfcbffdb4487e1282ecc5499332af2f784c8 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Sun, 25 Apr 2021 05:09:41 -0700 Subject: Fix selecting the profile in the dialog Previously, when clicking the "select" button in the profiles dialog (when the dialog was launched in the menu or toolbar), everything would be refreshed without checking the selected profile in the dialog. Now, the selected profile is set with some signal blocking to help prevent redundant refreshes from occurring. --- src/mainwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index bc9a3ce6..e998dd56 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2148,6 +2148,15 @@ void MainWindow::on_actionAdd_Profile_triggered() profilesDialog.exec(); m_SavesTab->refreshSaveList(); // since the save list may now be outdated we have to refresh it completely + if (profilesDialog.selectedProfile()) + { + // Change profile while blocking signals to prevent extra signals being sent + // Doesn't matter much as refreshProfiles() is being called after this + ui->profileBox->blockSignals(true); + ui->profileBox->setCurrentText(profilesDialog.selectedProfile().value()); + ui->profileBox->blockSignals(false); + } + if (refreshProfiles() && !profilesDialog.failed()) { break; } -- cgit v1.3.1