Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #12239 from AdmiralCurtiss/achievementprogresswidg…
…et-clearlayout

DolphinQt/AchievementProgressWidget: Use ClearLayoutRecursively() to clear layout.
  • Loading branch information
AdmiralCurtiss committed Oct 17, 2023
2 parents 7122c7e + 3873664 commit 53ea7ae
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -25,6 +25,7 @@
#include "Core/Core.h"

#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
#include "DolphinQt/QtUtils/ClearLayoutRecursively.h"
#include "DolphinQt/QtUtils/ModalMessageBox.h"
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
#include "DolphinQt/QtUtils/SignalBlocking.h"
Expand Down Expand Up @@ -133,12 +134,7 @@ AchievementProgressWidget::CreateAchievementBox(const rc_api_achievement_definit

void AchievementProgressWidget::UpdateData()
{
QLayoutItem* item;
while ((item = m_common_layout->layout()->takeAt(0)) != nullptr)
{
delete item->widget();
delete item;
}
ClearLayoutRecursively(m_common_layout);

if (!AchievementManager::GetInstance()->IsGameLoaded())
return;
Expand Down

0 comments on commit 53ea7ae

Please sign in to comment.