Update SValueMenu display after value change

This commit is contained in:
Jean Pierre Cimalando 2021-01-22 03:51:00 +01:00
parent ea3c43ca39
commit 2a82e5000b

View file

@ -239,8 +239,10 @@ bool SValueMenu::onWheel(const CPoint& where, const CMouseWheelAxis& axis, const
if (wheelInc != 0) { if (wheelInc != 0) {
float oldValue = getValue(); float oldValue = getValue();
setValueNormalized(getValueNormalized() + distance * wheelInc); setValueNormalized(getValueNormalized() + distance * wheelInc);
if (getValue() != oldValue) if (getValue() != oldValue) {
valueChanged(); valueChanged();
invalid();
}
} }
return true; return true;
} }
@ -249,8 +251,10 @@ void SValueMenu::onItemClicked(int32_t index)
{ {
float oldValue = getValue(); float oldValue = getValue();
setValue(menuItemValues_[index]); setValue(menuItemValues_[index]);
if (getValue() != oldValue) if (getValue() != oldValue) {
valueChanged(); valueChanged();
invalid();
}
} }
/// ///