mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04: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));
|
setValue(std::max(mValue-1, mMinValue));
|
||||||
eventValueChanged(mValue);
|
eventValueChanged(mValue);
|
||||||
}
|
}
|
||||||
else
|
else if (character == 0 || (character >= '0' && character <= '9'))
|
||||||
Base::onKeyButtonPressed(key, character);
|
Base::onKeyButtonPressed(key, character);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user