Merge pull request #12205 from LillyJadeKatrin/retroachievements-bugfix-2
AchievementsWindow: Fix rapid popups on initial opening.
This commit is contained in:
commit
5b6844901f
|
@ -65,11 +65,11 @@ AchievementHeaderWidget::AchievementHeaderWidget(QWidget* parent) : QWidget(pare
|
|||
m_total->addWidget(m_user_box);
|
||||
m_total->addWidget(m_game_box);
|
||||
|
||||
UpdateData();
|
||||
|
||||
m_total->setContentsMargins(0, 0, 0, 0);
|
||||
m_total->setAlignment(Qt::AlignTop);
|
||||
setLayout(m_total);
|
||||
|
||||
UpdateData();
|
||||
}
|
||||
|
||||
void AchievementHeaderWidget::UpdateData()
|
||||
|
|
|
@ -25,6 +25,8 @@ AchievementsWindow::AchievementsWindow(QWidget* parent) : QDialog(parent)
|
|||
ConnectWidgets();
|
||||
AchievementManager::GetInstance()->SetUpdateCallback(
|
||||
[this] { QueueOnObject(this, &AchievementsWindow::UpdateData); });
|
||||
|
||||
UpdateData();
|
||||
}
|
||||
|
||||
void AchievementsWindow::showEvent(QShowEvent* event)
|
||||
|
@ -44,7 +46,6 @@ void AchievementsWindow::CreateMainLayout()
|
|||
GetWrappedWidget(new AchievementSettingsWidget(m_tab_widget, this), this, 125, 100),
|
||||
tr("Settings"));
|
||||
m_tab_widget->addTab(GetWrappedWidget(m_progress_widget, this, 125, 100), tr("Progress"));
|
||||
m_tab_widget->setTabVisible(1, AchievementManager::GetInstance()->IsGameLoaded());
|
||||
|
||||
m_button_box = new QDialogButtonBox(QDialogButtonBox::Close);
|
||||
|
||||
|
|
Loading…
Reference in New Issue