ID 239437 - Standard number form widget incorrectly displays numbers of the form -X.999999[...] as -X

Follow

Problem summary:

Parameters and attributes representing individual numbers that are displayed using the standard widget (NumberFormWidget) are displayed (but not stored) as an integer if their value is sufficiently close to a non-zero value.  0.999999 is, reasonably, displayed as 1.  However, -0.99999 is displayed as 0, -1.999999 as -1, etc.

Steps to reproduce:

A good way to demonstrate the issue is the following:

  1. Create, edit and view a CameraCreate node.
  2. Set the first value of the screenWindow parameter ('left') as -1.999999.
  3. Expand the screenWindow parameter group and notice that the value is shown as -1.
  4. Expand the 'geometry' attribute of the camera location and note that the same is true of 'left'.

Expected behaviour:

The value is correctly rounded before truncation.

Actual behaviour:

Such negative values are truncated upwards.

Workaround:

No known workaround.

Reproduced versions/platforms:

  • All

Customer version/platform:

Not supplied.

    We're sorry to hear that

    Please tell us why