Opened 15 years ago
Closed 14 years ago
Last modified 14 years ago
#1133 closed defect (fixed)
grass toolbox: option description problems
|Reported by:||hamish||Owned by:||nobody|
|Priority:||major: does not work as expected||Milestone:||Version 1.0.3|
|Keywords:||grass toolbox qgm||Cc:||rblazek|
|Must Fix for Release:||Yes||Platform:||Debian|
|Platform Version:||Etch||Awaiting user input:||no|
A number of problems with the GRASS toolbox.
my test is with an addon-script: http://trac.osgeo.org/grass/browser/grass-addons/vector/v.surf.icw/qgis-toolbox
but this should happen with many modules.
Problem 1: Option descriptions longer than 40 or so characters are truncated and the text gets a "...". Making the window wider doesn't expose any more text. Important information about what the option does is lost.
Problem 2a: GRASS options (and flags and even modules) may have GUI labels. If present, the label should be used for the option descriptive text, and the "description" then becomes the tooltip help. I know it seems a bit weird at first, but it is an entrenched feature used by many modules. The QGIS grass toolbox module tab ignores the label and just shows the tooltip help, which is rather confusing.
Problem 2b: Also if "label"+"description" is used in the option, you can't run with that option empty (even if it is optional) because you get an error [something about [...]<br>]. If you put some default value there it runs fine.
Change History (9)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
See e.g. v.surf.rst
comment:3 by , 14 years ago
To pcav: The problem with comboboxes overlapping description and small space for buttons is not clear to me, can you provide a snapshot?
by , 14 years ago
Example of dorpdown overlapping label
comment:4 by , 14 years ago
|Status:||new → closed|
Fixed in revision 10787.
- Title / checkbox text is elided on resize.
2a. Label, if defined, is used as title, otherwise description is used. If both label and description are defined, description is used as tooltip.
2b. I don't believe it has anything to do with label/description. Once an option was defined for the module, the plugin required a value. I have changed it so that if the option is not required by GRASS and the value is empty, it is not append to parameters.
Fields combobox layout problem also fixed.
comment:5 by , 14 years ago
excellent to see this fixed. Does it also work for module title and flags?
$ svngrep -r -l 'module->label' * ... db/base/copy.c general/g.message/main.c imagery/i.atcorr/main.cpp imagery/i.class/main.c imagery/i.cluster/main.c imagery/i.maxlik/main.c misc/m.cogo/main.c raster/r.param.scale/interface.c raster/r.sun/main.c raster/wildfire/r.spread/main.c raster/r.sun2/main.c raster/r.horizon/main.c vector/v.external/main.c vector/v.net.salesman/main.c vector/v.net.iso/main.c vector/v.net.alloc/main.c vector/v.net.steiner/main.c $ svngrep -r -l 'flag->label' * ... vector/v.distance/main.c vector/v.distance/main.c vector/v.patch/main.c vector/v.net/main.c
I look forward to testing these out.
comment:6 by , 14 years ago
Flags yes, I have fixed also multiple options (v.distance) and category selection (v.net.iso) in revision 10790.
Module title is not displayed in module widget. Labels in modules tree are currently read from *.qgm files only. It sounds logical to read module label also from grass module description (especially for of translation), but that means to execute all grass modules when toolbox is opened and that could become too heavy. So that can be done once we modify the tree so that modules are loaded when a folder is expanded or we get some caching system (grass descriptions store in some tmp dir and only time is checked). In any case that is new feature, please fill in a new ticket if you are interested.
comment:7 by , 14 years ago
The work was sponsored by http://www.faunalia.it/
comment:8 by , 14 years ago
Problem 1 could be resolved by showing all the text when hovering over it with the mouse, or by allowing line breaks.
Furthermore, some buttons (eg dropdowns for selecting columns) overlap the description; the space allowed for the buttons is also too low, and the whole button does not show off.