Force progress bar to 100% on completed achievements

This commit is contained in:
LillyJadeKatrin 2024-07-10 08:51:13 -04:00
parent bb03fc04cc
commit 073426ead7
1 changed files with 2 additions and 1 deletions

View File

@ -117,11 +117,12 @@ void AchievementBox::UpdateProgress()
if (m_achievement->measured_percent > 0.000)
{
m_progress_bar->setRange(0, 100);
m_progress_bar->setValue(m_achievement->measured_percent);
m_progress_bar->setValue(m_achievement->unlocked ? 100 : m_achievement->measured_percent);
m_progress_bar->setTextVisible(false);
m_progress_label->setText(
QString::fromUtf8(m_achievement->measured_progress,
qstrnlen(m_achievement->measured_progress, PROGRESS_LENGTH)));
m_progress_label->setVisible(!m_achievement->unlocked);
m_progress_bar->setVisible(true);
}
else