Merge pull request #12239 from AdmiralCurtiss/achievementprogresswidget-clearlayout
DolphinQt/AchievementProgressWidget: Use ClearLayoutRecursively() to clear layout.
This commit is contained in:
commit
53ea7aee1b
|
@ -25,6 +25,7 @@
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
|
|
||||||
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
#include "DolphinQt/Config/ControllerInterface/ControllerInterfaceWindow.h"
|
||||||
|
#include "DolphinQt/QtUtils/ClearLayoutRecursively.h"
|
||||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||||
|
@ -133,12 +134,7 @@ AchievementProgressWidget::CreateAchievementBox(const rc_api_achievement_definit
|
||||||
|
|
||||||
void AchievementProgressWidget::UpdateData()
|
void AchievementProgressWidget::UpdateData()
|
||||||
{
|
{
|
||||||
QLayoutItem* item;
|
ClearLayoutRecursively(m_common_layout);
|
||||||
while ((item = m_common_layout->layout()->takeAt(0)) != nullptr)
|
|
||||||
{
|
|
||||||
delete item->widget();
|
|
||||||
delete item;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!AchievementManager::GetInstance()->IsGameLoaded())
|
if (!AchievementManager::GetInstance()->IsGameLoaded())
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue