mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Revised previous commit
This commit is contained in:
parent
61f088e59c
commit
69762e1b05
@ -88,8 +88,7 @@ CMeasure::CMeasure(CMeterWindow* meterWindow, const WCHAR* name) : CSection(name
|
||||
m_Disabled(false),
|
||||
m_Initialized(false),
|
||||
m_OldValue(0.0),
|
||||
m_OldStringValue(L""),
|
||||
m_SkipFirstChange(true)
|
||||
m_OldStringValue(L"")
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -74,8 +74,6 @@ public:
|
||||
double GetOldValue() { return m_OldValue; }
|
||||
void SetOldStringValue(std::wstring value) { m_OldStringValue = value; }
|
||||
std::wstring GetOldStringValue() { return m_OldStringValue; }
|
||||
void SetFirstChange(bool value) { m_SkipFirstChange = value; }
|
||||
bool GetFirstChange() { return m_SkipFirstChange; }
|
||||
|
||||
CMeterWindow* GetMeterWindow() { return m_MeterWindow; }
|
||||
|
||||
@ -125,7 +123,6 @@ protected:
|
||||
std::wstring m_OnChangeAction;
|
||||
double m_OldValue;
|
||||
std::wstring m_OldStringValue;
|
||||
bool m_SkipFirstChange;
|
||||
|
||||
CMeterWindow* m_MeterWindow;
|
||||
};
|
||||
|
@ -2693,13 +2693,11 @@ void CMeterWindow::Update(bool refresh)
|
||||
double newValue = (*i)->GetValue();
|
||||
const WCHAR* newStringValue = (*i)->GetStringValue(AUTOSCALE_OFF, 1, -1, false);
|
||||
std::wstring changeAction = (*i)->GetOnChangeAction();
|
||||
bool skip = (*i)->GetFirstChange();
|
||||
|
||||
if (skip)
|
||||
if (refresh)
|
||||
{
|
||||
(*i)->SetOldValue(newValue);
|
||||
(*i)->SetOldStringValue(newStringValue);
|
||||
(*i)->SetFirstChange(false);
|
||||
}
|
||||
else if (((*i)->GetOldValue() != newValue || (*i)->GetOldStringValue() != newStringValue) && !changeAction.empty())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user