Update SValueMenu display after value change
This commit is contained in:
parent
ea3c43ca39
commit
2a82e5000b
1 changed files with 6 additions and 2 deletions
|
|
@ -239,8 +239,10 @@ bool SValueMenu::onWheel(const CPoint& where, const CMouseWheelAxis& axis, const
|
|||
if (wheelInc != 0) {
|
||||
float oldValue = getValue();
|
||||
setValueNormalized(getValueNormalized() + distance * wheelInc);
|
||||
if (getValue() != oldValue)
|
||||
if (getValue() != oldValue) {
|
||||
valueChanged();
|
||||
invalid();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -249,8 +251,10 @@ void SValueMenu::onItemClicked(int32_t index)
|
|||
{
|
||||
float oldValue = getValue();
|
||||
setValue(menuItemValues_[index]);
|
||||
if (getValue() != oldValue)
|
||||
if (getValue() != oldValue) {
|
||||
valueChanged();
|
||||
invalid();
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue