View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002453||FreeCAD||Bug||public||2016-02-21 11:35||2016-05-20 08:09|
|Fixed in Version||0.17|
|Summary||0002453: Values of less than 1 unit entered into Units enabled input fields require a leading zero, except when entered and removed|
|Description||Generally the Units system seems to require the leading zero for input less than one of whatever unit is being entered. For example "0.5" of any unit will give you half that unit ("0.5 m" will give 500mm) however ".5" will not be accepted.|
There is some discussion on the forum claiming that this was not the case at one time, at one time apparently ".5" could be entered rather than "0.5".
in testing I have discovered a rather strange inconsistency in this behaviour, if the leading zero is first typed and then removed (without pressing OK or enter in between) then the leading zero is no longer required.
For example type "0.5 m" then move the cursor back and delete the leading zero with either the delete or backspace keys then you will have ".5 m" displaying in the dialogue, however if you now click OK or press enter the ".5 m" will be accepted as "0.5 m"
I suggest that the leading zero should either always be needed or never needed.
|Steps To Reproduce||enter an input field in either a property in combo view or double click on a constraint in a sketch, then enter a decimal followed by a digit with or without a defined unit e.g ".5 m", then value will be ignored.|
However firstly include typing the leading zero, e.g "0.5 m", then move the cursor back to either "delete" or "backspace" the leading zero so that you end up back with something like ".5 m"...that value will now be accepted and it seems that the leading zero will be automatically added e. your ".5 m" will be accepted as 500mm.
|Additional Information||OS: Ubuntu 12.04.5 LTS|
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6451 (Git)
Build type: Release
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18-dev
|Tags||No tags attached.|
||I just had another thought, perhaps there should be a error message saying that the input had not been valid so that it is clear that the value was not accepted rather than just ignoring it when the input value is invalid for any reason?|
||I have been able to duplicate this issue. I am working on a fix.|
||A pull request has been submitted for this bug: http://forum.freecadweb.org/viewtopic.php?f=17&t=15639|
FreeCAD: master 6ff95b90
Wolfgang E. Sanyer
Committer: wmayer Details Diff
|Bug fix for ID#0002453
Note that the version of Bison and Flex used to generate the two .c files are newer than
in the last commit from 2010. Also,for anyine working on tbis in the future, dont forget
to run flex and bison on the .l and .y files respectively.
|mod - src/Base/QuantityLexer.c||Diff File|
|mod - src/Base/QuantityParser.c||Diff File|
|add - src/Base/QuantityParser.h||Diff File|
|mod - src/Base/QuantityParser.l||Diff File|
|2016-02-21 11:35||jmaustpc||New Issue|
|2016-02-21 11:37||jmaustpc||Summary||Values less than 1 entered into input fields require a leading zero mostly, except when entered and removed => Values of less than 1 unit entered into Units enabled input fields require a leading zero, except when entered and removed|
|2016-02-21 11:41||jmaustpc||Note Added: 0006842|
|2016-02-29 11:43||wmayer||Status||new => confirmed|
|2016-05-06 15:55||ezzieyguywuf||Note Added: 0007062|
|2016-05-07 21:50||ezzieyguywuf||Note Added: 0007068|
|2016-05-20 08:08||wmayer||Changeset attached||=> FreeCAD Master master 6ff95b90|
|2016-05-20 08:09||wmayer||Status||confirmed => closed|
|2016-05-20 08:09||wmayer||Resolution||open => fixed|
|2016-05-20 08:09||wmayer||Category||Feature => Bug|
|2016-05-20 08:09||wmayer||Fixed in Version||=> 0.17|