Split AchievementBox UpdateData
AchievementBox now has UpdateData and UpdateProgress, which is called from UpdateData, but may be called elsewhere to update just the progress measurement of the achievement.
This commit is contained in:
parent
0cc1d4c62d
commit
75c2360aea
|
@ -87,6 +87,11 @@ void AchievementBox::UpdateData()
|
|||
m_status->setText(tr("Locked"));
|
||||
}
|
||||
|
||||
UpdateProgress();
|
||||
}
|
||||
|
||||
void AchievementBox::UpdateProgress()
|
||||
{
|
||||
if (m_achievement->measured_percent > 0.000)
|
||||
{
|
||||
m_progress_bar->setRange(0, 100);
|
||||
|
|
|
@ -20,6 +20,7 @@ class AchievementBox final : public QGroupBox
|
|||
public:
|
||||
explicit AchievementBox(QWidget* parent, rc_client_achievement_t* achievement);
|
||||
void UpdateData();
|
||||
void UpdateProgress();
|
||||
|
||||
private:
|
||||
QLabel* m_badge;
|
||||
|
|
Loading…
Reference in New Issue