Opened 17 years ago

Closed 17 years ago

#497 closed defect (fixed)

Floating point numbers with leading zeroes in the decimal part are not correctly displayed

Reported by: base Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 2.2.2
Component: web Version:
Keywords: float annotation type value display pb Cc:

Description

Version BASE 2.3.0pre (build #3130; schema #29) Web server Apache Tomcat/5.5.15 Database Dialect org.hibernate.dialect.MySQLInnoDBDialect JDBC Driver com.mysql.jdbc.Driver (version 5.0) Java runtime Java(TM) 2 Runtime Environment, Standard Edition (1.5.0_06-b05), Sun Microsystems Inc. Operating system Windows XP x86 5.1 Memory Total: 38.6 MB Free: 8.7 MB Max: 254.1 MB Browser Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

Using an AnnotationType of type 'Float' for entering value '0.04' when annotating an BioSource. Click OK to save BioSource Item View, go to the Annotation Tab (Primary annotation): The value actually displayed is '0.40' BioSource List View, the value actually displayed is also '0.40' Going back to the BioSource , click on Annotation Tab, then click on the 'edit' icon after the value actually show the entered value of 0.04.

when entering 0.004, display in Item View/List View is 0.00

when entering 0.4, display in Item View/List View is 0.4

Philippe

Change History (3)

comment:1 by Nicklas Nordborg, 17 years ago

Milestone: BASE 2.2.2
Owner: changed from Johan Enell to Nicklas Nordborg
Priority: majorminor
Status: newassigned

comment:2 by Nicklas Nordborg, 17 years ago

Summary: inconsistent (wrong) display of values for a annotation type of type float from ListViewFloating point numbers with leading zeroes in the decimal part are not correctly displayed

comment:3 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [3138]) Fixes #497: Floating point numbers with leading zeroes in the decimal part are not correctly displayed

Also added an option in the File/Preferences... dialog to allow a user to specify the number of decimals to display. This solves the 0.004 issue. Another (better) solution would be to make it possible to specify a default number of decimals to display for each annotation type. But it requires a lot more work and should be a tast of it's own.

Note: See TracTickets for help on using tickets.