Skip to content

Commit

Permalink
Fix problem with viewing unit descriptions for hidden units
Browse files Browse the repository at this point in the history
This applies when a specific unit of that type is available, for example
in the recall dialog.
  • Loading branch information
CelticMinstrel committed Dec 11, 2016
1 parent 057749b commit 87d9211
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/widgets/unit_preview_pane.cpp
Expand Up @@ -493,7 +493,10 @@ void unit_preview_pane::set_displayed_unit(const unit& u)
void unit_preview_pane::profile_button_callback()
{
if(get_window()) {
help::show_unit_help((*get_window()).video(), current_type_);
const unit_type* ut = unit_types.find(current_type_);
if(ut != nullptr) {
help::show_unit_description((*get_window()).video(), *ut);
}
}
}

Expand Down

0 comments on commit 87d9211

Please sign in to comment.