|
|
@@ -191,9 +191,10 @@ public: |
|
|
|
|
|
|
|
|
lastCurrentValue = newValue;
|
|
|
lastCurrentValue = newValue;
|
|
|
|
|
|
|
|
|
// (need to do this comparison because the Value will use equalsWithSameType to compare
|
|
|
|
|
|
// the new and old values, so will generate unwanted change events if the type changes)
|
|
|
|
|
|
if (currentValue != newValue)
|
|
|
|
|
|
|
|
|
// Need to do this comparison because the Value will use equalsWithSameType to compare
|
|
|
|
|
|
// the new and old values, so will generate unwanted change events if the type changes.
|
|
|
|
|
|
// Cast to double before comparing, to prevent comparing as another type (e.g. String).
|
|
|
|
|
|
if (static_cast<double> (currentValue.getValue()) != newValue)
|
|
|
currentValue = newValue;
|
|
|
currentValue = newValue;
|
|
|
|
|
|
|
|
|
updateText();
|
|
|
updateText();
|
|
|
|