Increased toString precision

This commit is contained in:
Pratham Gandhi 2024-01-16 23:18:18 +05:30
parent e4e43a8f91
commit 262e2faadd
2 changed files with 2 additions and 2 deletions

View File

@ -230,7 +230,7 @@ std::shared_ptr<Event> Event::createFormatEvent(FormField *target, Page *targetP
bool ok;
double converted = currentTextLocale.toDouble(fft->text(), &ok);
if (ok) {
eventVal = systemLocale.toString(converted);
eventVal = systemLocale.toString(converted, 'g', 32);
}
}
ret->setValue(QVariant(eventVal));

View File

@ -137,7 +137,7 @@ QJSValue JSField::fieldGetValueCore(bool asString) const
} else {
// Converting back and forth between locales here to avoid conversion issues between locales
if (ok) {
result = systemLocale.toString(textAsNumber);
result = systemLocale.toString(textAsNumber, 'g', 32);
} else {
result = text->text();
}