fix(color): EditNumber class not implementing zeroText logic (#4611)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user