GUI2/Unit Preview Pane: fixed default race icon not showing for units

Missed in 207e763401. Was only working for unit types.

(cherry-picked from commit f59f68a527)
This commit is contained in:
Charles Dang 2018-06-23 05:49:40 +11:00
parent e679abcf84
commit bdb5f34c9b
2 changed files with 3 additions and 1 deletions

View file

@ -50,6 +50,8 @@
### User interface
* Improved the layout of the Statistics dialog.
* Allow changing dropdown menu selections with the scrollwheel (FR #3251).
* Fixed the unit preview pane not showing the default race icon when detailing
a single unit's stats.
### WML engine
* Fixed errors about WESNOTH_VERSION not being defined when trying to load
add-ons that have preprocessor errors (issues #1924, #1634).

View file

@ -424,7 +424,7 @@ void unit_preview_pane::set_displayed_unit(const unit& u)
}
if(icon_race_) {
icon_race_->set_label("icons/unit-groups/race_" + u.race()->id() + "_30.png");
icon_race_->set_label(u.race()->get_icon_path_stem() + "_30.png");
}
if(icon_alignment_) {