Opened 3 years ago

Closed 3 years ago

Last modified 3 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

Description

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
d.legend.vect

'Hôpitaux' is displayed correctly.

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

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=" "
d.legend.vect

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

xK[
x[cc
x[]
x{

I would guess this some issue with memory address handling ?

Change History (4)

comment:1 Changed 3 years ago by annakrat

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

comment:2 in reply to:  1 Changed 3 years ago by veroandreo

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 Changed 3 years ago by mlennert

Resolution: fixed
Status: newclosed

Yes, nice.

Thanks.

Closing the bug.

comment:4 Changed 3 years ago by annakrat

Milestone: 7.0.57.2.0
Note: See TracTickets for help on using tickets.