properly hide units with 'hide_help=true' from the advance from line
This commit is contained in:
parent
9ee0dfb1e3
commit
583f730637
1 changed files with 3 additions and 4 deletions
|
@ -1262,19 +1262,18 @@ public:
|
|||
{
|
||||
std::string unit_id = *from_iter;
|
||||
std::map<std::string,unit_type>::const_iterator type = unit_type_data::types().find_unit_type(unit_id);
|
||||
if (type != unit_type_data::types().end())
|
||||
if (type != unit_type_data::types().end() && !type->second.hide_help())
|
||||
{
|
||||
if (from_iter != from_units.begin()) ss << ", ";
|
||||
std::string lang_unit = type->second.type_name();
|
||||
std::string ref_id;
|
||||
if (description_type(type->second) == FULL_DESCRIPTION && !type->second.hide_help()) {
|
||||
if (description_type(type->second) == FULL_DESCRIPTION) {
|
||||
ref_id = unit_prefix + type->second.id();
|
||||
} else {
|
||||
ref_id = unknown_unit_topic;
|
||||
lang_unit += " (?)";
|
||||
}
|
||||
ss << "<ref>dst='" << escape(ref_id) << "' text='" << escape(lang_unit) << "'</ref>";
|
||||
if (from_iter + 1 != from_units.end())
|
||||
ss << ", ";
|
||||
}
|
||||
}
|
||||
ss << "\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue