[GRASS-dev] wxGUI spin control for floating point ???

Anna Kratochvílová kratochanna at gmail.com
Thu Mar 21 14:21:40 PDT 2013

On Thu, Mar 21, 2013 at 9:15 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Thu, Mar 21, 2013 at 8:53 PM, Anna Kratochvílová
> <kratochanna at gmail.com> wrote:
>> On Thu, Mar 21, 2013 at 1:11 PM, Martin Landa <landa.martin at gmail.com> wrote:
>>> Hi,
>>> 2013/3/21 Markus Metz <markus.metz.giswork at gmail.com>:
>>>> What is the reason to have a spin control for floating point values?
>>>> Could the spin control at least not use the number but the significant
>>>> digits (same like printing with %g) for spinning? E.g. for 0.00000001
>>>> I see 0.000 which is wrong. IMHO the spin control should be reverted
>>>> to text input.
>>> sometimes float spin controls are useful sometimes not. Useful eg.
>>> `d.vect size`, but not for the case you mentioned. Probably we could
>>> stay with floating spin control (some improvements required)  rather
>>> than plain text input. No strong opinion here.
>> Because we don't know the meaningful number of digits, I agree to use
>> text input. Changing the float spin might be too much work and I think
>> it is not worth it. I have changed it in r55484.
> Thanks! That means we can change the r.terraflow default for d8cut
> back to infinity which is a valid number (#1888)?

Hm, not sure about that, there is a validator in the textCtrl to check
for float values...

Ok, if you use 'inf' as a default answer it should work because
float('inf') is a valid expression in Python.
But there was 'infinity', so if you insist on 'infinity', some
conversion must be done in forms.py before setting the value.


> Markus M
>> Anna

More information about the grass-dev mailing list