diff --git a/doomsday/libdeng2/include/de/widgets/operatorrule.h b/doomsday/libdeng2/include/de/widgets/operatorrule.h index ed63de7fbe..5b6591583f 100644 --- a/doomsday/libdeng2/include/de/widgets/operatorrule.h +++ b/doomsday/libdeng2/include/de/widgets/operatorrule.h @@ -57,8 +57,8 @@ class DENG2_PUBLIC OperatorRule : public Rule return *refless(new OperatorRule(Maximum, left, right)); } - static Rule const &maximum(Rule const &left, Rule const *right) { - if(right) return *refless(new OperatorRule(Maximum, left, *right)); + static Rule const &maximum(Rule const &left, Rule const *rightOrNull) { + if(rightOrNull) return *refless(new OperatorRule(Maximum, left, *rightOrNull)); return left; } diff --git a/doomsday/libdeng2/src/widgets/constantrule.cpp b/doomsday/libdeng2/src/widgets/constantrule.cpp index 07f4eed7b3..d1f5cff7c2 100644 --- a/doomsday/libdeng2/src/widgets/constantrule.cpp +++ b/doomsday/libdeng2/src/widgets/constantrule.cpp @@ -33,10 +33,13 @@ ConstantRule::ConstantRule(float constantValue) void ConstantRule::set(float newValue) { - _pendingValue = newValue; + if(!fequal(_pendingValue, newValue)) + { + _pendingValue = newValue; - // Dependent values will need updating. - invalidate(); + // Dependent values will need updating. + invalidate(); + } } String ConstantRule::description() const