Fix broken help crosslinks for unit types with all-hidden variations
Regression introduced in 6fe72e893f
.
Affected master only, because I missed two relevant lines when manually
forward-porting its 1.12 counterpart.
This commit is contained in:
parent
b63e4e5f29
commit
92be8cd73d
1 changed files with 2 additions and 2 deletions
|
@ -289,7 +289,7 @@ std::string unit_topic_generator::operator()() const {
|
|||
std::string lang_unit = type->type_name();
|
||||
std::string ref_id;
|
||||
if (description_type(*type) == FULL_DESCRIPTION) {
|
||||
const std::string section_prefix = type->variations().empty() ? "" : "..";
|
||||
const std::string section_prefix = type->show_variations_in_help() ? ".." : "";
|
||||
ref_id = section_prefix + unit_prefix + type->id();
|
||||
} else {
|
||||
ref_id = unknown_unit_topic;
|
||||
|
@ -315,7 +315,7 @@ std::string unit_topic_generator::operator()() const {
|
|||
first = false;
|
||||
}
|
||||
const unit_type* base_type = unit_types.find(base_id, unit_type::HELP_INDEXED);
|
||||
const std::string section_prefix = base_type->variations().empty() ? "" : "..";
|
||||
const std::string section_prefix = base_type->show_variations_in_help() ? ".." : "";
|
||||
ss << make_link(base_type->type_name(), section_prefix + unit_prefix + base_id) << "\n";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue