level change description: only if the level changed
This commit is contained in:
parent
be485e0711
commit
89a3a7f4c6
1 changed files with 3 additions and 2 deletions
|
@ -83,9 +83,10 @@ class Route:
|
||||||
description = item.waytype.description
|
description = item.waytype.description
|
||||||
if item.waytype.up_separate and item.edge.rise > 0:
|
if item.waytype.up_separate and item.edge.rise > 0:
|
||||||
description = item.waytype.description_up
|
description = item.waytype.description_up
|
||||||
if item.waytype.level_change_description:
|
if item.waytype.level_change_description and item.last_item and item.level != item.last_item.level:
|
||||||
description = (description % {
|
description = (description % {
|
||||||
'level_change_description': ' '+item.waytype.level_change_description+' '
|
'level_change_description': ' '+(item.waytype.level_change_description %
|
||||||
|
{'level': item.level.title})+ ' '
|
||||||
}).replace(' ', ' ').replace(' .', '.')
|
}).replace(' ', ' ').replace(' .', '.')
|
||||||
item.descriptions.append((icon, item.waytype.description_up))
|
item.descriptions.append((icon, item.waytype.description_up))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue