diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 1be7338191..65cf19aa22 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "settings_dialog.h" @@ -985,10 +986,10 @@ void settings_dialog::OnApplyStylesheet() int settings_dialog::exec() { - for (int i = 0; i < ui->tabWidget->count(); i++) - { - ui->tabWidget->setCurrentIndex(i); - } - ui->tabWidget->setCurrentIndex(m_tab_Index); + // singleShot Hack to fix following bug: + // If we use setCurrentIndex now we will miraculously see a resize of the dialog as soon as we + // switch to the cpu tab after conjuring the settings_dialog with another tab opened first. + // Weirdly enough this won't happen if we change the tab order so that anything else is at index 0. + QTimer::singleShot(0, [=]{ ui->tabWidget->setCurrentIndex(m_tab_Index); }); return QDialog::exec(); } diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index fc002f54f3..7935a4d701 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -30,7 +30,7 @@ true - + 0 0 @@ -46,7 +46,7 @@ - +