Bug report #1133

grass toolbox: option description problems

Added by hamish - over 16 years ago. Updated over 15 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:GRASS
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

Description

Hi,

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.

thanks,
Hamish

labels.png - Example of dorpdown overlapping label (10.2 KB) Paolo Cavallini, 2009-04-27 05:58 AM

History

#1 Updated by Paolo Cavallini over 15 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.

#2 Updated by Paolo Cavallini over 15 years ago

See e.g. v.surf.rst

#3 Updated by Redmine Admin over 15 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?

Radim

#4 Updated by Redmine Admin over 15 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.

Radim

#5 Updated by hamish - over 15 years ago

Hi Radim,

excellent to see this fixed. Does it also work for module title and flags?

i.e.

$ 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.

best,
Hamish

#6 Updated by Redmine Admin over 15 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.

Radim

#7 Updated by Redmine Admin over 15 years ago

The work was sponsored by [http://www.faunalia.it/]

Radim

Also available in: Atom PDF