mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Fixed an issue that ReadConfig() is called unnecessarily when DynamicVariables=1 and UpdateDivider=* are set.
This commit is contained in:
parent
999ab0bd18
commit
2186b2eb2a
@ -37,13 +37,13 @@ public:
|
||||
|
||||
virtual const WCHAR* GetStats();
|
||||
|
||||
void SetName(const WCHAR* name) { m_Name = name; m_ANSIName = ConvertToAscii(name); };
|
||||
const WCHAR* GetName() { return m_Name.c_str(); };
|
||||
const char* GetANSIName() { return m_ANSIName.c_str(); };
|
||||
void SetName(const WCHAR* name) { m_Name = name; m_ANSIName = ConvertToAscii(name); }
|
||||
const WCHAR* GetName() { return m_Name.c_str(); }
|
||||
const char* GetANSIName() { return m_ANSIName.c_str(); }
|
||||
|
||||
void Disable() { m_Disabled = true; };
|
||||
void Enable() { m_Disabled = false; };
|
||||
bool IsDisabled() { return m_Disabled; };
|
||||
void Disable() { m_Disabled = true; }
|
||||
void Enable() { m_Disabled = false; }
|
||||
bool IsDisabled() { return m_Disabled; }
|
||||
|
||||
bool HasDynamicVariables() { return m_DynamicVariables; }
|
||||
|
||||
@ -52,8 +52,11 @@ public:
|
||||
double GetValue();
|
||||
double GetRelativeValue();
|
||||
double GetValueRange();
|
||||
double GetMinValue() { return m_MinValue; };
|
||||
double GetMaxValue() { return m_MaxValue; };
|
||||
double GetMinValue() { return m_MinValue; }
|
||||
double GetMaxValue() { return m_MaxValue; }
|
||||
|
||||
UINT GetUpdateCounter() { return m_UpdateCounter; }
|
||||
UINT GetUpdateDivider() { return m_UpdateDivider; }
|
||||
|
||||
virtual const WCHAR* GetStringValue(bool autoScale, double scale, int decimals, bool percentual);
|
||||
static void GetScaledValue(int decimals, double theValue, WCHAR* buffer);
|
||||
|
@ -89,6 +89,9 @@ public:
|
||||
void SetName(const WCHAR* name) { m_Name = name; }
|
||||
const WCHAR* GetName() { return m_Name.c_str(); }
|
||||
|
||||
UINT GetUpdateCounter() { return m_UpdateCounter; }
|
||||
UINT GetUpdateDivider() { return m_UpdateDivider; }
|
||||
|
||||
static CMeter* Create(const WCHAR* meter, CMeterWindow* meterWindow);
|
||||
|
||||
static void DrawBevel(Gdiplus::Graphics& graphics, Gdiplus::Rect& rect, Gdiplus::Pen& light, Gdiplus::Pen& dark);
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user