Modify ↓
Opened 3 months ago
#24410 new enhancement
Increase "Length Step" (tlenstep) precision
| Reported by: | Lumikeiju | Owned by: | team |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Plugin buildings_tools | Version: | latest |
| Keywords: | Cc: |
Description
Rationale
1 ft = 0.3048 m, but when the value 0.3048 is entered in the building_tools plugin's BuildingSizeDialog "Length step" (tlenstep) field, it is rounded to 0.305 and this causes a compounding error resulting in lengths like 100.07 ft when 100 ft is intended.
Fix
Use setMaximumFractionDigits() to support 4 decimal points:
private final JFormattedTextField tlenstep = new JFormattedTextField(NumberFormat.getInstance());
{
((NumberFormat) tlenstep.getFormatter()).setMaximumFractionDigits(4);
}
Attachments (1)
Note:
See TracTickets
for help on using tickets.



Updated BuildingSizeDialog.java for building_tools plugin: support 4 decimal places