Commit Graph
1 Commits
Author SHA1 Message Date
HanifKoh ea4927b601 Trim Trailing Zeros at the Decimal Separator wxWidgets Wrote (#17704)
* Trim Trailing Zeros at the Decimal Separator wxWidgets Wrote

double_to_string formats with wxNumberFormatter, which writes the UI locale's decimal separator, but trimmed after the C locale's separator. When the two differ, as reported on macOS in Czech and Russian, nothing was trimmed and fields showed 0.2000. Trim at wxNumberFormatter::GetDecimalSeparator() instead.

* Parse Point Fields Whichever Decimal Separator They Show

Point fields write X and Y with the UI locale's decimal separator but read them back with ToDouble, which uses the C locale's. When the two differ, any value with decimals fails with Invalid numeric and resets. Read them with string_to_double_any_separator, which converts the other separator to the C locale's before ToDouble, so every input ToDouble accepted before still parses.
2026-11-21 05:41:23 +08:00