View Issue Details

IDProjectCategoryView StatusLast Update
0002453FreeCADBugpublic2016-05-20 08:09
ReporterjmaustpcAssigned To 
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.16 
Target VersionFixed in Version0.17 
Summary0002453: Values of less than 1 unit entered into Units enabled input fields require a leading zero, except when entered and removed
DescriptionGenerally 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".

http://forum.freecadweb.org/viewtopic.php?f=3&t=14323

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 Reproduceenter 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 InformationOS: 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
Branch: master
Hash: 7bdecf9b38cdc83e32168277c7cb3aa72f199302
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18-dev
TagsNo tags attached.

Activities

jmaustpc

2016-02-21 11:41

manager   ~0006842

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?

ezzieyguywuf

2016-05-06 15:55

developer   ~0007062

I have been able to duplicate this issue. I am working on a fix.

ezzieyguywuf

2016-05-07 21:50

developer   ~0007068

A pull request has been submitted for this bug: http://forum.freecadweb.org/viewtopic.php?f=17&t=15639

Issue History

Date Modified Username Field Change
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