|
Sweet Home 3D Forum » List all forums » » Forum: Developers » » » Thread: Sweet Home 3D 6.5A bug was found in Sweet Home 3D » » » » Post: Re: Sweet Home 3D 6.5A bug was found in Sweet Home 3D |
Print at Dec 17, 2025, 9:14:15 AM |
| Posted by Puybaret at Dec 6, 2021, 11:33:38 AM |
|
Re: Sweet Home 3D 6.5A bug was found in Sweet Home 3D I just checked the source code of the TotalResult class you programmed, and you formatted surface texts another way in UpdateCalc method. As you compute the text of the surface unit unitSurf from the name of the current length unit, this can lead to errors for languages where this name is localized (like Chinese or Russian). A quick fix could consist of testing the current unit and not its name. Therefore, the line: if (unitName.equalsIgnoreCase("mm") || unitName.equalsIgnoreCase("cm") || unitName.equalsIgnoreCase("m")) {if (preferences.getLengthUnit() == LengthUnit.MILLIMETER || preferences.getLengthUnit() == LengthUnit.CENTIMETER || preferences.getLengthUnit() == LengthUnit.METER) {Good luck for the roofs! ---------------------------------------- Emmanuel Puybaret, Sweet Home 3D creator |
|
|
Current timezone is GMT Dec 17, 2025, 9:14:15 AM |