diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-08-30 14:28:32 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-08-30 14:28:32 +0200 |
commit | 68f0d21cc45989c537047ab1e0cc08de960c66f1 (patch) | |
tree | 2f392dea7e56cb4b57ed753a4c2fb6dc2302d3c9 /scene/gui | |
parent | ca652bbc47063b5386c1d020ddaf9662fe9b22b5 (diff) |
Ignore the prefix and suffix in the SpinBox expression
This fixes a regression caused by
86a31e9e385c7909a0cdd24a5ee790c3dca03b98.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/spin_box.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 3c63f6b2c7..172c366c41 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -53,7 +53,8 @@ void SpinBox::_text_entered(const String &p_string) { Ref<Expression> expr; expr.instance(); - Error err = expr->parse(p_string); + // Ignore the prefix and suffix in the expression + Error err = expr->parse(p_string.trim_prefix(prefix + " ").trim_suffix(" " + suffix)); if (err != OK) { return; } |