Bug 372987

Summary: Non-optimal precision for cloth counts in various dialogues
Product: [Applications] KXStitch Reporter: Karl Ove Hufthammer <karl>
Component: generalAssignee: Steve Allewell <steve.allewell>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Karl Ove Hufthammer 2016-11-27 09:14:34 UTC
The number of digits for cloth counts differ in various dialogues:

Preferences: 15 (inches) or 5.91 (centimeters)
Import image: 15.00 (inches) or 5.91 (centimeters)
File properties: 15.00 (inches) or 5.91 (centimeters)

And the which digits changes when you use the up/down arrows to change the values also differs:

Preferences: 1 (inches) or 0.01 (centimeters)
Import image: 1 (inches) or 0.01 (centimeters)
File properties: 1 (inches) or 1 (centimeters) (!)

First, two decimal digits for centimeters is too much. In Europe, cloth counts are always reported with a precision of 0.1, e.g. 5.4 squares/cm. And I believe in the US, the cloth counts are always reported in integer squares/inch. So the numbers should be displayed as

  15 (inches)
  5.9 (centimeters)

And the step size should be integer to inches in 0.1 for centimeters, e.g. pressing the down arrow should result in

  14 (inches)
  5.8 (centimeters)
Comment 1 Steve Allewell 2016-12-14 21:00:37 UTC
Git commit fded3b62be6377a38bab936027c4b98102f873dc by Steve Allewell.
Committed on 14/12/2016 at 20:55.
Pushed by sallewell into branch 'master'.

Fix a number of usability bugs with number formats

Change formatting of cloth count across a number of dialogs. Fix some
conversion errors between stitches/cm/inches.  Set cloth count
preference to users locale by default. Add suffixes to identify units
used.
Related: bug 372985, bug 372984

M  +23   -6    kxstitch.kcfg
M  +3    -3    kxstitchui.rc
M  +89   -46   src/ConfigurationDialogs.cpp
M  +5    -3    src/ConfigurationDialogs.h
M  +18   -14   src/Document.cpp
M  +2    -2    src/Editor.cpp
M  +1    -1    src/Editor.h
M  +7    -7    src/Element.cpp
M  +115  -59   src/FilePropertiesDlg.cpp
M  +5    -4    src/FilePropertiesDlg.h
M  +91   -15   src/ImportImageDlg.cpp
M  +7    -9    src/MainWindow.cpp
M  +1    -1    src/PatternElementDlg.cpp
M  +1    -1    src/Scale.cpp
M  +15   -15   ui/FileProperties.ui
M  +3    -0    ui/ImportImage.ui
M  +7    -2    ui/PatternConfigPage.ui

https://commits.kde.org/kxstitch/fded3b62be6377a38bab936027c4b98102f873dc