Bug report #1133
grass toolbox: option description problems
|Affected QGIS version:||Regression?:||No|
|Operating System:||Debian||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11193|
A number of problems with the GRASS toolbox.
my test is with an addon-script:
but this should happen with many modules.
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.
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.
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.
#1 Updated by Paolo Cavallini over 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.
#4 Updated by Redmine Admin over 14 years ago
- Status changed from Open to Closed
- Resolution set to fixed
Fixed in revision 10787.
1. 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.
#5 Updated by hamish - over 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.
#6 Updated by Redmine Admin over 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.