Fix a bug in the ap function

This could prevent it from updating values if you returned to
the original value. E.g., if your values went 1, 2, 1, 2, you'd
get notifications for 1, 2, 2. This would also cause some extra
notifications to go when the logical value didn't actually change.
This commit is contained in:
Sarah Gerweck 2015-08-09 22:32:59 -07:00
parent 32449979b4
commit 914e168771

View File

@ -42,6 +42,7 @@ trait ObservableImplicits {
val newVal = recalculate() val newVal = recalculate()
if (prevValue != newVal) { if (prevValue != newVal) {
prop.value = newVal prop.value = newVal
prevValue = newVal
} }
} }