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