Fixed an issue that ReadConfig() is called unnecessarily when DynamicVariables=1 and UpdateDivider=* are set.

This commit is contained in:
spx
2010-11-25 23:57:10 +00:00
parent 999ab0bd18
commit 2186b2eb2a
3 changed files with 18 additions and 10 deletions

View File

@ -2409,7 +2409,8 @@ void CMeterWindow::Update(bool nodraw)
std::list<CMeasure*>::const_iterator i = m_Measures.begin();
for( ; i != m_Measures.end(); ++i)
{
if ((*i)->HasDynamicVariables())
if ((*i)->HasDynamicVariables() &&
((*i)->GetUpdateCounter() + 1) >= (*i)->GetUpdateDivider())
{
try
{
@ -2429,7 +2430,8 @@ void CMeterWindow::Update(bool nodraw)
std::list<CMeter*>::const_iterator j = m_Meters.begin();
for( ; j != m_Meters.end(); ++j)
{
if ((*j)->HasDynamicVariables())
if ((*j)->HasDynamicVariables() &&
((*j)->GetUpdateCounter() + 1) >= (*j)->GetUpdateDivider())
{
try
{