On Fri, Mar 23, 2018 at 7:54 PM, Markus Neteler <nete...@osgeo.org> wrote:
> On Fri, Mar 23, 2018 at 11:54 PM, Pietro <peter.z...@gmail.com> wrote: > > Dear dev, > > > > I've noticed that the module d.linegraph define the secondary_width > > parameter as follow: > > > > > > ``` > > /* theoretically for other things than points */ > > secondary_width_opt = G_define_option(); > > secondary_width_opt->key = "secondary_width"; > > secondary_width_opt->description = _("Width of point symbol lines"); > > secondary_width_opt->type = TYPE_INTEGER; > > secondary_width_opt->required = NO; > > secondary_width_opt->multiple = YES; > > secondary_width_opt->answer = "0.1"; > > ``` > > > > So the parameter type is supposed to be an integer, but the default > value it > > is a float? > > Is it intentional and in case why? > > It came in through r69694. Probably simply an oversight? > secondary_width_opt is used to set symbol_line_width which is of type double, the conversion is done with atof(), and symbol_line_width is used for D_line_width() which takes double, so no, it is not intentional. Fixed in r72558, backported to 7.4 in 72559. https://trac.osgeo.org/grass/browser/grass/trunk/display/d.linegraph/main.c https://trac.osgeo.org/grass/changeset/69694 https://grass.osgeo.org/programming7/draw2_8c.html#a7d7fc5729a6e6d14ad6403ed53466414 https://trac.osgeo.org/grass/changeset/72558
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev