Field Validation Error - Leading or trailing white space should be removed automatically
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Wishlist
|
Wayne Stambaugh |
Bug Description
When copy-pasting Manufacturer Part Numbers, etc, out of datasheets, it's very easy to pick up a leading or trailing white space.
When pasting that information into a field in a part in EESchema, it fails with a dialog saying that leading and/or trailing white space isn't allowed.
Instead of failing, and canning the pasted data, it would be helpful if it just removed the offending whitespace (and for anyone who cares, threw up a dialog box saying it's removed whitespace with a "don't show this again" tickbox?)
Application: kicad
Version: 4.0.5 release build
wxWidgets: Version 3.0.2 (debug,
Platform: Mac OS X (Darwin 16.4.0 x86_64), 64 bit, Little endian, wxMac
Boost version: 1.57.0
Changed in kicad: | |
assignee: | nobody → Wayne Stambaugh (stambaughw) |
tags: | added: 4.0.5 4.0.6 |
Changed in kicad: | |
status: | Fix Committed → Fix Released |
Normally I'm against silently modifying data entered by a user, but I think we could probably safely strip whitespace. I'd much rather not have a dialog for that, it's pretty obnoxious.
Of course my _preferred_ way to approach this would be to fix the reason why leading/trailing whitespace isn't allowed -- why isn't it?? -- and leave that to the user. I'd much rather just store what the user types. You can delete it yourself. But if we can't allow storing whitespace I'd be okay with stripping it.