mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +00:00
Fix NumericEditBox behavior broken by switch to std::stoi
For some reason stoi doesn't throw an error for '1foo' while 'foo1' does. Now the edit box flat out rejects any non-digit key events.
This commit is contained in:
parent
719255c5c6
commit
9fda3b6db4
@ -87,7 +87,7 @@ namespace Gui
|
||||
setValue(std::max(mValue-1, mMinValue));
|
||||
eventValueChanged(mValue);
|
||||
}
|
||||
else
|
||||
else if (character == 0 || (character >= '0' && character <= '9'))
|
||||
Base::onKeyButtonPressed(key, character);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user