fix(color): EditNumber class not implementing zeroText logic (#4611)

This commit is contained in:
Frankie Arzu
2024-02-11 12:20:20 +10:00
committed by GitHub
parent 2323e62249
commit 7c8c41313a
+4
View File
@@ -118,6 +118,8 @@ class NumberEdit: public FormField
std::string str;
if (displayFunction != nullptr) {
str = displayFunction(currentValue);
} else if (!zeroText.empty() && currentValue==0) {
str = zeroText;
} else {
str = formatNumberAsString(currentValue, textFlags, 0, prefix.c_str(),
suffix.c_str());
@@ -176,6 +178,8 @@ class NumberEdit: public FormField
std::string str;
if (displayFunction != nullptr) {
str = displayFunction(currentValue);
} else if (!zeroText.empty() && currentValue==0) {
str = zeroText;
} else {
str = formatNumberAsString(currentValue, textFlags, 0, prefix.c_str(),
suffix.c_str());