diff options
| author | Chris Bessent <lost.dragonist@gmail.com> | 2021-04-25 05:09:41 -0700 |
|---|---|---|
| committer | Chris Bessent <lost.dragonist@gmail.com> | 2021-04-25 05:09:58 -0700 |
| commit | 8308dfcbffdb4487e1282ecc5499332af2f784c8 (patch) | |
| tree | 395a28838d5b807e0617c2daf0797cc576a31b2b | |
| parent | 40a4bf1e3a25d98da481c6807e327f036a9a33e6 (diff) | |
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.
| -rw-r--r-- | src/mainwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |
