Advertising

Commit message:
fix rt rendering of the building help
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1744583 in widelands: "Building help looks weird"
https://bugs.launchpad.net/widelands/+bug/1744583
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1744583_fix_global_helptexts/+merge/337051
The problem is that data/tribes/scripting/help/building_help.lua is used in the
tribal encyclopedia and for the building help. Adding 'rt' tags to the
building_help.lua causes a crash when opening the tribal encyclopedia then. For
the tribal encyclopedia the 'rt' tags get added when calling as_message().
https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/wui/encyclopedia_window.cc#L171
I guess the crash happens because we have double 'rt' tags then (one time in
the building_help.lua and one time when calling as_message().
The solution is to add the 'rt' tags for the building_help when the
building_help window get opened. I used the method text_layout:as_waresinfo()
for this. IMHO this looks as expected.
Sorry for the bad named branch :-S
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/bug-1744583_fix_global_helptexts into lp:widelands.