Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3123 closed defect (fixed)

d.legend.vect: wrong handling of spaces in legend_label

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.2.0
Component: Addons Version: unspecified
Keywords: d.legend.vect, gsoc2016, cartography Cc:
CPU: Unspecified Platform: Unspecified


When using spaces in the legend_label parameter of d.vect, d.legend.vect only displays the first word before the space.

An example with the NC dataset:

d.vect map=hospitals@PERMANENT type=point,line,boundary,area,face width=1 legend_label=Hôpitaux

'Hôpitaux' is displayed correctly.

d.vect map=hospitals@PERMANENT type=point,line,boundary,area,face width=1 legend_label="Les Hôpitaux"

Only 'Les' is displayed in the legend.

In the legend file, there is

Les Hôpitaux|basic/x|5|black|200:200:200|1|point|160

So the issue seems to be clearly with d.legend.vect.

Another issue with white space:

d.vect map=hospitals@PERMANENT type=point,line,boundary,area,face width=1 legend_label=" "

Now I see an 'x' as the label in the map display. In addition, if I repeatedly click on 'Apply' in the d.legend.vect gui, the label displayed cycles through a series of weird combinations of characters, always beginning with the 'x'. Combinations I've seen include


I would guess this some issue with memory address handling ?

Change History (4)

comment:1 by annakrat, 8 years ago

Please try with the latest fix in d.legend.vect (just download d.legend.vect again).

in reply to:  1 comment:2 by veroandreo, 8 years ago

Replying to annakrat:

Please try with the latest fix in d.legend.vect (just download d.legend.vect again).

Just tested, it now handles spaces in labels correctly :)

comment:3 by mlennert, 8 years ago

Resolution: fixed
Status: newclosed

Yes, nice.


Closing the bug.

comment:4 by annakrat, 8 years ago

Note: See TracTickets for help on using tickets.