diff --git a/Library/Measure.cpp b/Library/Measure.cpp index 65ea44fc..5eafadd8 100644 --- a/Library/Measure.cpp +++ b/Library/Measure.cpp @@ -543,32 +543,27 @@ bool CMeasure::Update() { // Disabled measures have 0 as value m_Value = 0.0; + + // Set IfAction committed state to false if condition is not met with value = 0 + if ((int)m_IfEqualValue != 0) + { + m_IfEqualCommitted = false; + } + + if (m_IfAboveValue <= 0.0) + { + m_IfAboveCommitted = false; + } + + if (m_IfBelowValue >= 0.0) + { + m_IfBelowCommitted = false; + } + return false; } } -void CMeasure::Disable() -{ - m_Disabled = true; - - // IfActions are not checked when disabled, so set committed state to false if - // condition is not met with value = 0 - if ((int)m_IfEqualValue != 0) - { - m_IfEqualCommitted = false; - } - - if (m_IfAboveValue <= 0.0) - { - m_IfAboveCommitted = false; - } - - if (m_IfBelowValue >= 0.0) - { - m_IfBelowCommitted = false; - } -} - /* ** Returns the value of the measure. ** diff --git a/Library/Measure.h b/Library/Measure.h index d00c84b7..9f607539 100644 --- a/Library/Measure.h +++ b/Library/Measure.h @@ -57,7 +57,7 @@ public: const WCHAR* GetName() { return m_Name.c_str(); } const std::wstring& GetOriginalName() { return m_Name; } - void Disable(); + void Disable() { m_Disabled = true; } void Enable() { m_Disabled = false; } bool IsDisabled() { return m_Disabled; }