← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH][RFC] Footprint wizards

 

Le 15/09/2016 à 00:16, Oliver Walters a écrit :
> JP,
> 
> Ok, that should be a pretty easy fix. For testing on my side, how do I get KiCad to use a comma for
> floating point separator? Is this a language setting?

This is a language setting.
It could be no so easy to test, if the system language uses the same separator as the "C" language.

The easy fix is do not use the wxWidgets floating point validator (no validator).
The user must enter fp numbers using the "C" locale separator (the point).

The best fix is more complicated, and imply :
- Use the selected language (usually the system language, but not always) fp separator to display fp
number in dialog (this is not currently the case: currently this is the "C" locale separator, used
by the Python script)
- In countries which use an other separator (a comma), allow both the current locale separator *and*
the "C" locale separator.

This issue is well known in Kicad.

> 
> On Thu, Sep 15, 2016 at 1:56 AM, jp charras <jp.charras@xxxxxxxxxx <mailto:jp.charras@xxxxxxxxxx>>
> wrote:
> 
>     Le 14/09/2016 à 14:09, Oliver Walters a écrit :
>     > Hi all,
>     >
>     > First time submitting a patch, so here goes....
>     >
>     > The attached patch deals with a number of issues with regards to the footprint wizards manager. It
>     > started off as what I imagined was a fairly simple task to improve the UX of the FP wizards
>     > interface, but it evolved into something a bit more complex as I delved deeper into the source!
>     >
>     > Improvements are as follows:
>     >
>     > 1. I have done away with the use of a leading asterisk to designate the "units" of a wizard
>     > parameter. Multiple parameter types can now be defined (integer, float, mm, mils, bool, etc..)
>     >
>     > 2. Input validation. Each type of parameter is now validated properly within the wizards screen.
>     > Integer parameters can only be set to integers, dimensions can only be floating point, etc.
> 
>     Unfortunately, it does not work in countries which use a comma as floating point separator:
>     I cannot enter floating point values:
> 
>     The validator expects a comma as floating point separator, and the python script expects a point as
>     separator.
> 
>     >


-- 
Jean-Pierre CHARRAS


Follow ups

References