View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002866 | FreeCAD | Bug | public | 2017-01-18 19:49 | 2018-01-02 11:34 |
Reporter | mlampert | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.17 | ||||
Target Version | 0.17 | Fixed in Version | 0.17 | ||
Summary | 0002866: Gui::InputField rounds values to 2 digits | ||||
Description | Setting a value in an InputField rounds the value to the nearest 2 decimal digit internal value. Set value to 1.125 mm once Enter is hit it shows 1.13 mm. Editing the same value again gives 1.13 mm, and not 1.125 mm. Retrieving the value from the InputField does indeed result in the value getting truncated, if converted to um it shows 1130um. | ||||
Additional Information | Forum thread for discussion: http://forum.freecadweb.org/viewtopic.php?f=10&t=20022 | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
In the user settings you can define the number of decimals which in your case might be set to 2. To avoid confusion it's maybe best to restrict the input field not to allow to enter more than 2 digits after the separator like for a QDoubleSpinBox. |
|
The problem is not the displaying of 2 digits, that's what I expected from the setting. The issue is that value is actually rounded to 2 digits - which is absolutely not what I expected. Maybe it's a documentation issue and we should make it clear that "if you only see 2 digits than that is all there will be". |
|
https://github.com/FreeCAD/FreeCAD/commit/a6a004b6b2e9dd0c3b1f3706253af71c27a47035 Current behaviour is absolutely correct but it's true that it should be more obvious to the user that if per user settings 2 decimals are set that only 2 decimals are used. So, this can e.g. be done when the input field loses focus that it displays the quantity as it will be used when reading it out. Btw, if needed you can also change the number of decimals for an input field independent of user settings:
|
Date Modified | Username | Field | Change |
---|---|---|---|
2017-01-18 19:49 | mlampert | New Issue | |
2017-01-18 20:02 | Kunda1 | Additional Information Updated | |
2017-05-02 11:10 | Kunda1 | Relationship added | related to 0001822 |
2017-05-02 11:11 | Kunda1 | Relationship added | related to 0002970 |
2017-09-24 19:46 | wmayer | Note Added: 0010175 | |
2017-09-24 20:07 | mlampert | Note Added: 0010177 | |
2017-10-18 12:28 | wmayer | Target Version | => 0.17 |
2018-01-02 11:34 | wmayer | Status | new => closed |
2018-01-02 11:34 | wmayer | Resolution | open => fixed |
2018-01-02 11:34 | wmayer | Fixed in Version | => 0.17 |
2018-01-02 11:34 | wmayer | Note Added: 0010658 |