<div dir="ltr"><div><br>On Tue, Sep 1, 2015 at 5:14 AM, Radim Blazek <<a href="mailto:radim.blazek@gmail.com">radim.blazek@gmail.com</a>> wrote:<br>><br>> On Tue, Aug 25, 2015 at 3:31 AM, Vaclav Petras <<a href="mailto:wenzeslaus@gmail.com">wenzeslaus@gmail.com</a>> wrote:<br>> > Was: [Qgis-developer] QGIS GRASS plugin - modules upgrade<br>> >> >> 2) define relations between options (e.g. type or column option<br>> >> >> relation with input vector) or special options which has dedicated<br>> >> >> widget in UI (e.g. GDAL/OGR input).<br>> >> ><br>> >> > This should be defined in GRASS GIS. If it is missing in GRASS or in the<br>> >> > --interface-description then it is a bug which should be solved.<br>> >><br>> >> How can I recognize G_OPT_V_TYPE in  --interface-description? It does<br>> >> not have gisprompt.<br>> ><br>> ><br>> > Right [1]. I think this is a bug. No gisprompt is there. I think wxGUI<br>> > doesn't need it because the values for the combo box are defined there<br>> > already.<br>><br>> How does the wxGUI know that the option should be placed in Selection tab?<br><br></div>It is defined using guisection:<br><div><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/vector/v.distance/main.c#L97">https://trac.osgeo.org/grass/browser/grass/trunk/vector/v.distance/main.c#L97</a><br><br></div><div>In the XML it looks like:<br><br>    <parameter name="from_layer" type="string" required="no" multiple="no"><br>        <label><br>            Layer number or name (from)<br>        </label><br>        ...<br>        <guisection><br>            From<br>        </guisection><br>    </parameter><br><br></div><div>It is not defined what should happen with the ones which do not have guisection, i.e. it is up to you to decide and it doesn't make sense for GRASS GIS to enforce one representation or the other. The old behavior in wxGUI was that all required options/parameters were in the Required tab and all with non defined guisection were in Optional tab together with all flags without guisection specified. The current (and better) behavior is that wxGUI respects the guisection specified for required options/parameters and (if it is actually specified) includes a red star to a field description. In this case, it is up to the module to have it defined nicely which means that module should specify guisection for every required parameter if it is defining it for at least one (i.e. define all or nothing). The Optional tab still behaves the same and contains all not-required options/parameters without guisection. So now Required and Optional behave the same -- as fallbacks.<br></div></div>