From 92be8cd73db9841cec8d611bc060775c71e8c4b3 Mon Sep 17 00:00:00 2001 From: "Ignacio R. Morelle" Date: Mon, 22 Dec 2014 21:16:14 -0300 Subject: [PATCH] Fix broken help crosslinks for unit types with all-hidden variations Regression introduced in 6fe72e893fbfdf38832e457a671aebdc16266e87. Affected master only, because I missed two relevant lines when manually forward-porting its 1.12 counterpart. --- src/help/help_topic_generators.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/help/help_topic_generators.cpp b/src/help/help_topic_generators.cpp index c404c1aa4016..5a2a5e8d13d0 100644 --- a/src/help/help_topic_generators.cpp +++ b/src/help/help_topic_generators.cpp @@ -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"; } }