Bug report #14019

Problems with a field where precision = length

Added by Alister Hood almost 9 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Vectors
Affected QGIS version:2.12.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:22032

Description

This looks like it is just a corner case remaining after the fix for #5173.

A) QGIS allows me to create a column with precision = length. I'm not sure if this itself is a bug, but it then behaves strangely with that column:
B) e.g. if I create a field with precision = length = 2, when editing a feature I can save in that field either three digits before the decimal point or two after it (is this a bug or a feature of the shapefile format? Perhaps it is related to Christine's comment at #5546)
C) but the gui lets me put in a lot more digits both before and after the decimal point.
D) and even if I save the edit I can't see the "rounding" that occurs unless I reopen the attribute table.

Apologies if I haven't chosen the most appropriate category - I'm wondering if it should be "GUI".


Related issues

Related to QGIS Application - Bug report #5173: Shape file field precision includes the . when saving, bu... Closed 2012-03-13
Related to QGIS Application - Bug report #5154: Need to check that precision<field width when adding a co... Closed 2012-03-10

Associated revisions

Revision 9d473aae
Added by Alexander Bruy almost 9 years ago

don't allow field precision greater than field width (fix #14019, #5154)

Revision c1f7257b
Added by Nyall Dawson almost 9 years ago

Merge pull request #2682 from alexbruy/field-precision

don't allow field precision greater than field width (fix #14019, #5154)

History

#1 Updated by Nyall Dawson almost 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF