FIX: remove some unnecessary refresh to reduce page faults

jira: [none]
Change-Id: If4dae82f7aae243db033fe9c8d4d1ab25f625557
(cherry picked from commit b1fa2421c0425ad077b899e1d793cde219826042)
This commit is contained in:
xin.zhang
2025-02-10 20:08:12 +08:00
committed by Noisyfox
parent 319e93ba4d
commit 6c8c4ab3dc
3 changed files with 37 additions and 25 deletions

View File

@@ -113,10 +113,14 @@ void ProgressBar::Reset()
}
void ProgressBar::SetProgress(int step)
{
m_disable = false;
{
if (step < 0) return;
//if (step == m_step) return;
if (m_disable == false && m_step == step)
{
return;
}
m_disable = false;
m_step = step;
Refresh();
}